Fix remaining RPC tests.
This commit is contained in:
@@ -41,6 +41,7 @@ class PourTxTest(BitcoinTestFramework):
|
||||
assert_equal(self.cannot_pour(node, txn), True)
|
||||
|
||||
def run_test(self):
|
||||
# All nodes should start with 1,250 BTC:
|
||||
starting_balance = 1000
|
||||
for i in range(4):
|
||||
assert_equal(self.nodes[i].getbalance(), starting_balance)
|
||||
@@ -55,7 +56,7 @@ class PourTxTest(BitcoinTestFramework):
|
||||
for i in range(4):
|
||||
(total_in, inputs) = gather_inputs(self.nodes[i], 40)
|
||||
pool[i] = self.nodes[i].createrawtransaction(inputs, {})
|
||||
pool[i] = self.nodes[i].zcrawpour(pool[i], {}, {zcaddress:49.9}, 40, 0.1)
|
||||
pool[i] = self.nodes[i].zcrawpour(pool[i], {}, {zcaddress:39.9}, 40, 0.1)
|
||||
signed = self.nodes[i].signrawtransaction(pool[i]["rawtxn"])
|
||||
|
||||
# send the tx to both halves of the network
|
||||
@@ -89,25 +90,25 @@ class PourTxTest(BitcoinTestFramework):
|
||||
# Create pour {A, B}->{*}
|
||||
pour_AB = self.nodes[0].zcrawpour(blank_tx,
|
||||
{pool[0] : zcsecretkey, pool[1] : zcsecretkey},
|
||||
{zcaddress:(49.9*2)-0.1},
|
||||
{zcaddress:(39.9*2)-0.1},
|
||||
0, 0.1)
|
||||
|
||||
# Create pour {B, C}->{*}
|
||||
pour_BC = self.nodes[0].zcrawpour(blank_tx,
|
||||
{pool[1] : zcsecretkey, pool[2] : zcsecretkey},
|
||||
{zcaddress:(49.9*2)-0.1},
|
||||
{zcaddress:(39.9*2)-0.1},
|
||||
0, 0.1)
|
||||
|
||||
# Create pour {C, D}->{*}
|
||||
pour_CD = self.nodes[0].zcrawpour(blank_tx,
|
||||
{pool[2] : zcsecretkey, pool[3] : zcsecretkey},
|
||||
{zcaddress:(49.9*2)-0.1},
|
||||
{zcaddress:(39.9*2)-0.1},
|
||||
0, 0.1)
|
||||
|
||||
# Create pour {A, D}->{*}
|
||||
pour_AD = self.nodes[0].zcrawpour(blank_tx,
|
||||
{pool[0] : zcsecretkey, pool[3] : zcsecretkey},
|
||||
{zcaddress:(49.9*2)-0.1},
|
||||
{zcaddress:(39.9*2)-0.1},
|
||||
0, 0.1)
|
||||
|
||||
# (a) Node 0 will spend pour AB, then attempt to
|
||||
@@ -179,5 +180,4 @@ class PourTxTest(BitcoinTestFramework):
|
||||
sync_blocks(self.nodes)
|
||||
|
||||
if __name__ == '__main__':
|
||||
PourTxTest().main()
|
||||
|
||||
PourTxTest().main()
|
||||
Reference in New Issue
Block a user