From 1b26a36ebc2117459c9605b6f58b874161af3d7d Mon Sep 17 00:00:00 2001 From: John Adler Date: Sun, 28 Jul 2019 22:17:04 -0400 Subject: [PATCH] Verify transfer now checks for amount + fees. (#457) --- .../src/per_block_processing/verify_transfer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth2/state_processing/src/per_block_processing/verify_transfer.rs b/eth2/state_processing/src/per_block_processing/verify_transfer.rs index 20a16959b..d42b7d1f2 100644 --- a/eth2/state_processing/src/per_block_processing/verify_transfer.rs +++ b/eth2/state_processing/src/per_block_processing/verify_transfer.rs @@ -62,8 +62,8 @@ fn verify_transfer_parametric( // Verify the sender has adequate balance. verify!( - time_independent_only || sender_balance >= transfer.amount, - Invalid::FromBalanceInsufficient(transfer.amount, sender_balance) + time_independent_only || sender_balance >= total_amount, + Invalid::FromBalanceInsufficient(total_amount, sender_balance) ); // Verify sender balance will not be "dust" (i.e., greater than zero but less than the minimum deposit