Skip to content

Commit af7975b

Browse files
committed
Revert "Fix block.fees() (exclude coinbase)."
This reverts commit 35deaf5.
1 parent a2c40ad commit af7975b

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/chain/block.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -671,17 +671,13 @@ static uint64_t block_subsidy(size_t height, uint64_t subsidy_interval,
671671

672672
uint64_t block::fees() const NOEXCEPT
673673
{
674-
if (txs_->empty())
675-
return {};
676-
677674
// Overflow returns max_uint64.
678675
const auto value = [](uint64_t total, const auto& tx) NOEXCEPT
679676
{
680677
return ceilinged_add(total, tx->fee());
681678
};
682679

683-
return std::accumulate(std::next(txs_->begin()), txs_->end(),
684-
uint64_t{}, value);
680+
return std::accumulate(txs_->begin(), txs_->end(), uint64_t{}, value);
685681
}
686682

687683
uint64_t block::claim() const NOEXCEPT

0 commit comments

Comments
 (0)