Fix (most) rpc tests by updating balances. zcpour, zcpourdoublespend, and txn_doublespend currently fail.
This commit is contained in:
@@ -21,9 +21,9 @@ class PourTxTest(BitcoinTestFramework):
|
||||
zcsecretkey = zckeypair["zcsecretkey"]
|
||||
zcaddress = zckeypair["zcaddress"]
|
||||
|
||||
(total_in, inputs) = gather_inputs(self.nodes[1], 50)
|
||||
(total_in, inputs) = gather_inputs(self.nodes[1], 40)
|
||||
protect_tx = self.nodes[1].createrawtransaction(inputs, {})
|
||||
pour_result = self.nodes[1].zcrawpour(protect_tx, {}, {zcaddress:49.9}, 50, 0.1)
|
||||
pour_result = self.nodes[1].zcrawpour(protect_tx, {}, {zcaddress:49.9}, 40, 0.1)
|
||||
|
||||
receive_result = self.nodes[1].zcrawreceive(zcsecretkey, pour_result["encryptedbucket1"])
|
||||
assert_equal(receive_result["exists"], False)
|
||||
@@ -50,12 +50,11 @@ class PourTxTest(BitcoinTestFramework):
|
||||
assert_equal(receive_result["exists"], True)
|
||||
|
||||
def run_test(self):
|
||||
# All nodes should start with 1,250 BTC:
|
||||
starting_balance = 1250
|
||||
starting_balance = 1000
|
||||
for i in range(4):
|
||||
assert_equal(self.nodes[i].getbalance(), starting_balance)
|
||||
self.nodes[i].getnewaddress("") # bug workaround, coins generated assigned to first getnewaddress!
|
||||
|
||||
|
||||
# Generate zcaddress keypairs
|
||||
zckeypair1 = self.nodes[0].zcrawkeygen()
|
||||
zcsecretkey1 = zckeypair1["zcsecretkey"]
|
||||
@@ -65,14 +64,14 @@ class PourTxTest(BitcoinTestFramework):
|
||||
zcsecretkey2 = zckeypair2["zcsecretkey"]
|
||||
zcaddress2 = zckeypair2["zcaddress"]
|
||||
|
||||
self.nodes[0].move("", "foo", 1220)
|
||||
self.nodes[0].move("", "foo", 970)
|
||||
self.nodes[0].move("", "bar", 30)
|
||||
assert_equal(self.nodes[0].getbalance(""), 0)
|
||||
|
||||
change_address = self.nodes[0].getnewaddress("foo")
|
||||
|
||||
# Pour some of our money into this address
|
||||
(total_in, inputs) = gather_inputs(self.nodes[0], 1210)
|
||||
(total_in, inputs) = gather_inputs(self.nodes[0], 960)
|
||||
outputs = {}
|
||||
outputs[change_address] = 78
|
||||
rawtx = self.nodes[0].createrawtransaction(inputs, outputs)
|
||||
|
||||
Reference in New Issue
Block a user