File tree Expand file tree Collapse file tree
include/bitcoin/database/impl/query Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,10 +36,13 @@ TEMPLATE
3636uint64_t CLASS::get_tx_fee (const tx_link& link) const NOEXCEPT
3737{
3838 const auto tx = get_transaction (link, false );
39- if (is_coinbase (link) )
40- return {} ;
39+ if (!tx )
40+ return max_uint64 ;
4141
42- return tx && populate_without_metadata (*tx) ? tx->fee () : max_uint64;
42+ if (tx->is_coinbase ())
43+ return zero;
44+
45+ return populate_without_metadata (*tx) ? tx->fee () : max_uint64;
4346}
4447
4548TEMPLATE
@@ -54,7 +57,7 @@ TEMPLATE
5457bool CLASS::get_tx_fees (fee_rate& out, const tx_link& link) const NOEXCEPT
5558{
5659 const auto tx = get_transaction (link, false );
57- if (!tx || !populate_without_metadata (*tx))
60+ if (!tx || tx-> is_coinbase () || !populate_without_metadata (*tx))
5861 return false ;
5962
6063 out.bytes = tx->virtual_size ();
You can’t perform that action at this time.
0 commit comments