tree checksum vpatch file split hunks
all signers: mircea_popescu trinque asciilifeform ben_vulpes mod6
antecedents: genesis programmable-versionstring
press order:
patch:
(177 . 6)(177 . 8)- 6B2389129DEC411D013D754EAEBC169A23F60B2169DC41CCED21248A603CED46DFDC64E016C082A154AF87784049333BE75C91FB08265306A3BDC2BC0AF2E6C5
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
- 72641FCB9BCE1F705246CF52F08B3ECE4B8DF65E07CA10A32DB860D4A120532A911FC62549960CCFDFC020FD1A5EF8BAF0FCF181B861E0903C65B044899FC008(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
- D7E407108638C11F75B5BED04DC455AC78A96DEBC0776CD0E71871001C5886FD1472AE060E7A2334FCF3E323B7AD0A1B4FB68757392CC45A1B09721EB67415D1(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();