Skip to content

Commit

Permalink
Fix token check bugs from #2582 (#2612)
Browse files Browse the repository at this point in the history
* Fix token check bugs from #2582

* fix fmt
  • Loading branch information
prasannavl authored Oct 24, 2023
1 parent 2cc5a7d commit 0fd8107
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/dfi/consensus/tokens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@

Res CTokensConsensus::CheckTokenCreationTx() const {
if (tx.vout.size() < 2 || tx.vout[0].nValue < GetTokenCreationFee(height) || tx.vout[0].nTokenId != DCT_ID{0} ||
tx.vout[1].nValue != GetTokenCollateralAmount() || tx.vout[1].nTokenId != DCT_ID{0},
"malformed tx vouts (wrong creation fee or collateral amount)") {
;
tx.vout[1].nValue != GetTokenCollateralAmount() || tx.vout[1].nTokenId != DCT_ID{0}) {
return Res::Err("malformed tx vouts (wrong creation fee or collateral amount)");
}

return Res::Ok();
Expand Down

0 comments on commit 0fd8107

Please sign in to comment.