aboutsummaryrefslogtreecommitdiff
path: root/src/test/script_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2014-11-06 06:54:50 -0800
committerPieter Wuille <[email protected]>2014-11-20 17:22:06 +0100
commita53fd4148596f5814409e15647714bdd2a71468b (patch)
tree56ceafe58e482181a7858ed59018a164e76d7cff /src/test/script_tests.cpp
parentAdd the RFC6979 PRNG (diff)
downloaddiscoin-a53fd4148596f5814409e15647714bdd2a71468b.tar.xz
discoin-a53fd4148596f5814409e15647714bdd2a71468b.zip
Deterministic signing
Diffstat (limited to 'src/test/script_tests.cpp')
-rw-r--r--src/test/script_tests.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 36aaa6903..d3a48234c 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -248,8 +248,9 @@ public:
{
uint256 hash = SignatureHash(scriptPubKey, spendTx, 0, nHashType);
std::vector<unsigned char> vchSig, r, s;
+ uint32_t iter = 0;
do {
- key.Sign(hash, vchSig);
+ key.Sign(hash, vchSig, iter++);
if ((lenS == 33) != (vchSig[5 + vchSig[3]] == 33)) {
NegateSignatureS(vchSig);
}