mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
Merge pull request #3210
39992134
txpool: Properly bail out when outputs_amount == inputs_amount (Leon Klingele)
This commit is contained in:
commit
bfddb2283b
@ -151,13 +151,20 @@ namespace cryptonote
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint64_t outputs_amount = get_outs_money_amount(tx);
|
uint64_t outputs_amount = get_outs_money_amount(tx);
|
||||||
if(outputs_amount >= inputs_amount)
|
if(outputs_amount > inputs_amount)
|
||||||
{
|
{
|
||||||
LOG_PRINT_L1("transaction use more money then it has: use " << print_money(outputs_amount) << ", have " << print_money(inputs_amount));
|
LOG_PRINT_L1("transaction use more money then it has: use " << print_money(outputs_amount) << ", have " << print_money(inputs_amount));
|
||||||
tvc.m_verifivation_failed = true;
|
tvc.m_verifivation_failed = true;
|
||||||
tvc.m_overspend = true;
|
tvc.m_overspend = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else if(outputs_amount == inputs_amount)
|
||||||
|
{
|
||||||
|
LOG_PRINT_L1("transaction fee is zero: outputs_amount == inputs_amount, rejecting.");
|
||||||
|
tvc.m_verifivation_failed = true;
|
||||||
|
tvc.m_fee_too_low = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
fee = inputs_amount - outputs_amount;
|
fee = inputs_amount - outputs_amount;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user