You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
coinbase_outputs[0].value = match new_template.coinbase_tx_value_remaining.checked_mul(1){//check that value_remaining is updated by TPSome(result) => result,None => returnErr(Error::ValueRemainingNotUpdated),};
The comment say that we want to check if value remaining is updated by the TP, this make sense. But the code do not do that1.
Here IMO we can just check if coinbase_tx_value_remaining != 0 with an assertion (is fine to panic here cause if it is 0 tp is sending wrong templates and pool can not work)
Footnotes
the code it only verify that an u64 multiplied by one do not overflow, I'm pretty sure that this is impossible. ↩
The text was updated successfully, but these errors were encountered:
In roles_logic_sv2 we have:
The comment say that we want to check if value remaining is updated by the TP, this make sense. But the code do not do that1.
Here IMO we can just check if coinbase_tx_value_remaining != 0 with an assertion (is fine to panic here cause if it is 0 tp is sending wrong templates and pool can not work)
Footnotes
the code it only verify that an u64 multiplied by one do not overflow, I'm pretty sure that this is impossible. ↩
The text was updated successfully, but these errors were encountered: