tree checksum vpatch file split hunks
all signers: mod6
antecedents: genesis programmable-versionstring
press order:
patch:
(177 . 6)(177 . 8)- 07093A81B0656609E0FA8066A5743D874C5DBDF148309DD6E9ED2050AC0CAC2B07D5AA64983E6BC71BD2BE2FD1D93DD581E66C32A0DA81904AA730E32D43CDD1
5 " -verifyall \t\t " + _("Forbid the skipping of ECDSA signature verification between checkpoints.\n") +
6 " -setverstring \t\t " + _("Set a custom version string.\n") +
7 " -setvernum \t\t " + _("Set a custom version number.\n") +
8 " -highs \t\t " + _("Set all transactions to have DER 'S' Value set to 'high'.\n") +
9 " -lows \t\t " + _("Set all transactions to have DER 'S' Value set to 'low'.\n") +
10 " -logtimestamps \t " + _("Prepend debug output with timestamp\n") +
11 " -printtoconsole \t " + _("Send trace/debug info to console instead of debug.log file\n") +
12 " -rpcuser=<user> \t " + _("Username for JSON-RPC connections\n") +
(200 . 6)(202 . 14)
14 fDaemon = GetBoolArg("-daemon");
15 fCanEat = GetBoolArg("-caneat");
16 fVerifyAll = GetBoolArg("-verifyall");
17 fHighS = GetBoolArg("-highs");
18 fLowS = GetBoolArg("-lows");
19
20 if (fHighS && fLowS)
21 {
22 printf("Error: '-highs' and '-lows' can not be set at the same time.\n");
23 return false;
24 }
25
26 if (mapArgs.count("-setverstring"))
27 {
(291 . 12)(291 . 46)
32 bool Sign(uint256 hash, std::vector<unsigned char>& vchSig)
33 {
34 vchSig.clear();
35 unsigned char pchSig[10000];
36 unsigned int nSize = 0;
37 if (!ECDSA_sign(0, (unsigned char*)&hash, sizeof(hash), pchSig, &nSize, pkey))
38 ECDSA_SIG *sig = ECDSA_do_sign((unsigned char *) &hash, sizeof(hash), pkey);
39
40 if (sig == NULL)
41 {
42 printf("ERROR, ECDSA_sign failed in key.h:Sign()\n");
43 return false;
44 vchSig.resize(nSize);
45 memcpy(&vchSig[0], pchSig, nSize);
46 }
47
48 BN_CTX *ctx = BN_CTX_new();
49 BN_CTX_start(ctx);
50 const EC_GROUP *group = EC_KEY_get0_group(pkey);
51 BIGNUM *order = BN_CTX_get(ctx);
52 BIGNUM *halforder = BN_CTX_get(ctx);
53 EC_GROUP_get_order(group, order, ctx);
54 BN_rshift1(halforder, order);
55
56 if (fHighS && (BN_cmp(sig->s, halforder) < 0))
57 {
58 // enforce high S values
59 BN_sub(sig->s, order, sig->s);
60 }
61
62 if (fLowS && (BN_cmp(sig->s, halforder) > 0))
63 {
64 // enforce low S values
65 BN_sub(sig->s, order, sig->s);
66 }
67
68 BN_CTX_end(ctx);
69 BN_CTX_free(ctx);
70 unsigned int nSize = ECDSA_size(pkey);
71 vchSig.resize(nSize); // Make sure it is big enough
72 unsigned char *pos = &vchSig[0];
73 nSize = i2d_ECDSA_SIG(sig, &pos);
74 //printf("DEBUG DER R: 0x%s\n", BN_bn2hex(sig->r));
75 //printf("DEBUG DER R: %s\n", BN_bn2dec(sig->r));
76 //printf("DEBUG DER S: 0x%s\n", BN_bn2hex(sig->s));
77 //printf("DEBUG DER S: %s\n", BN_bn2dec(sig->s));
78 ECDSA_SIG_free(sig);
79 vchSig.resize(nSize); // Shrink to fit actual size
80 return true;
81 }
82
- E74ABD10E4E001CA9C202672E2D2678C131F0AD06200E0D8C477728F92B1710644CC15ABB7E5773B277F38A00E004A4EC4C7CEE799A7E9C82C39297B94D540DA(32 . 6)(32 . 8)
87 string strMiscWarning;
88 bool fNoListen = false;
89 bool fLogTimestamps = false;
90 bool fLowS = false;
91 bool fHighS = false;
92
93 std::string CLIENT_NAME(DEFAULT_CLIENT_NAME);
94
- 99AA3DF7DC2E63380BA9916DAE9DFE69D6DE7BCBF2BD39809CC528DEA2699E3B664294175697D4B6ADE7FE39DC42420573F59503653D3C22352270C27CD3C1CC(122 . 6)(122 . 8)
99 extern bool fNoListen;
100 extern bool fLogTimestamps;
101 extern std::string CLIENT_NAME;
102 extern bool fLowS;
103 extern bool fHighS;
104
105 void RandAddSeed();
106 void RandAddSeedPerfmon();