put burntx opreturn at end of vout and fix crash with import tx

This commit is contained in:
Scott Sadler
2018-09-04 05:29:36 -03:00
parent 3716229824
commit 52ff32a564
4 changed files with 15 additions and 12 deletions

View File

@@ -59,7 +59,7 @@ bool Eval::ImportCoin(const std::vector<uint8_t> params, const CTransaction &imp
// check burn amount
{
uint64_t burnAmount = burnTx.vout[0].nValue;
uint64_t burnAmount = burnTx.vout.back().nValue;
if (burnAmount == 0)
return Invalid("invalid-burn-amount");
uint64_t totalOut = 0;