Browse Source

fix money_xfer pow-reward unit test

x 2 năm trước cách đây
mục cha
commit
d7c3ac140e
1 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 5 5
      src/contract/money/tests/pow_reward.rs

+ 5 - 5
src/contract/money/tests/pow_reward.rs

@@ -120,14 +120,14 @@ fn pow_reward() -> Result<()> {
 
         th.assert_trees(&HOLDERS);
 
+        // Bob should have this new OwnCoin.
+        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[0], None)?;
+        let alice_oc = th.gather_owncoin(&Holder::Alice, &transfer_params.outputs[1], None)?;
         alice_owncoins.push(alice_oc);
 
-        // Bob should have this new one.
-        let bob_oc = th.gather_owncoin(&Holder::Bob, &transfer_params.outputs[1], None)?;
-        bob_owncoins.push(bob_oc);
-
         // Alice can also send her PoW reward directly to bob
         current_height += 1;
         th.generate_slot(current_height).await?;