mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
fix genesis_mint unit test
This commit is contained in:
@@ -157,14 +157,14 @@ fn genesis_mint() -> Result<()> {
|
||||
|
||||
th.assert_trees(&HOLDERS);
|
||||
|
||||
// Alice should now have one OwnCoin with the change from the above transaction.
|
||||
let alice_oc = th.gather_owncoin(&Holder::Alice, &transfer_params.outputs[0], None)?;
|
||||
alice_owncoins.push(alice_oc);
|
||||
|
||||
// Bob should have his old one, and this new one.
|
||||
let bob_oc = th.gather_owncoin(&Holder::Bob, &transfer_params.outputs[1], None)?;
|
||||
// Bob should have his old OwnCoin, and this new one.
|
||||
let bob_oc = th.gather_owncoin(&Holder::Bob, &transfer_params.outputs[0], None)?;
|
||||
bob_owncoins.push(bob_oc);
|
||||
|
||||
// Alice should now have one OwnCoin with the change from the above transaction.
|
||||
let alice_oc = th.gather_owncoin(&Holder::Alice, &transfer_params.outputs[1], None)?;
|
||||
alice_owncoins.push(alice_oc);
|
||||
|
||||
assert!(alice_owncoins.len() == 1);
|
||||
assert!(bob_owncoins.len() == 2);
|
||||
|
||||
@@ -193,11 +193,11 @@ fn genesis_mint() -> Result<()> {
|
||||
th.assert_trees(&HOLDERS);
|
||||
|
||||
// Alice should now have two OwnCoins
|
||||
let alice_oc = th.gather_owncoin(&Holder::Alice, &transfer_params.outputs[1], None)?;
|
||||
let alice_oc = th.gather_owncoin(&Holder::Alice, &transfer_params.outputs[0], None)?;
|
||||
alice_owncoins.push(alice_oc);
|
||||
|
||||
// Bob should have two with the change from the above tx
|
||||
let bob_oc = th.gather_owncoin(&Holder::Bob, &transfer_params.outputs[0], None)?;
|
||||
let bob_oc = th.gather_owncoin(&Holder::Bob, &transfer_params.outputs[1], None)?;
|
||||
bob_owncoins.push(bob_oc);
|
||||
|
||||
// Validating transaction outcomes
|
||||
|
||||
Reference in New Issue
Block a user