-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #3535 - bitcartel:fix_regtest_signrawtransaction, r=str4d
Do not use APPROX_RELEASE_HEIGHT to get consensus branch id in regtest mode. Closes #3534
- Loading branch information
Showing
4 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env python2 | ||
# Copyright (c) 2018 The Zcash developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
from test_framework.test_framework import BitcoinTestFramework | ||
from test_framework.util import start_nodes, wait_and_assert_operationid_status | ||
|
||
class RegtestSignrawtransactionTest (BitcoinTestFramework): | ||
|
||
def setup_nodes(self): | ||
return start_nodes(4, self.options.tmpdir, [[ | ||
"-nuparams=5ba81b19:200", # Overwinter | ||
"-nuparams=76b809bb:204", # Sapling | ||
]] * 4) | ||
|
||
def run_test(self): | ||
self.nodes[0].generate(1) | ||
self.sync_all() | ||
taddr = self.nodes[1].getnewaddress() | ||
zaddr1 = self.nodes[1].z_getnewaddress('sprout') | ||
|
||
self.nodes[0].sendtoaddress(taddr, 2.0) | ||
self.nodes[0].generate(1) | ||
self.sync_all() | ||
|
||
# Create and sign Overwinter transaction. | ||
# If the incorrect consensus branch id is selected, there will be a signing error. | ||
opid = self.nodes[1].z_sendmany(taddr, | ||
[{'address': zaddr1, 'amount': 1}]) | ||
wait_and_assert_operationid_status(self.nodes[1], opid) | ||
|
||
if __name__ == '__main__': | ||
RegtestSignrawtransactionTest().main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters