Skip to content

Commit

Permalink
Merge pull request #330 from cyyber/master
Browse files Browse the repository at this point in the history
Fix: Condition to check de-stake transaction
  • Loading branch information
cyyber committed Sep 18, 2022
2 parents 69346f9 + b40c368 commit e2c6cc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/state_processor.go
Expand Up @@ -850,7 +850,7 @@ func ValidateStakeTxn(tx *transactions.Stake, statedb *state.StateDB) error {
"stake", txHash, addrFrom, tx.Nonce(), accountState.Nonce())
}

if tx.Amount() < config.GetDevConfig().StakeAmount {
if tx.Amount() != 0 && tx.Amount() < config.GetDevConfig().StakeAmount {
return fmt.Errorf(errmsg.TXInvalidStakeAmount,
"stake", tx.Hash(), addrFrom, tx.Amount(), config.GetDevConfig().StakeAmount)
}
Expand Down

0 comments on commit e2c6cc9

Please sign in to comment.