Skip to content

Commit

Permalink
Comments, style.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Apr 4, 2023
1 parent 2f8cf49 commit bbf6bcf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/chain/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ namespace libbitcoin {
namespace system {
namespace chain {

// Product overflows guarded by script size limit.
static_assert(max_script_size <
max_size_t / multisig_default_sigops / heavy_sigops_factor,
"input sigop overflow guard");

// Constructors.
// ----------------------------------------------------------------------------

Expand Down Expand Up @@ -319,11 +324,6 @@ bool input::extract_sigop_script(chain::script& out,
return true;
}

// Product overflows guarded by script size limit.
static_assert(max_script_size <
max_size_t / multisig_default_sigops / heavy_sigops_factor,
"input sigop overflow guard");

// TODO: Prior to block 79400 sigops were limited only by policy.
// TODO: Create legacy sigops fork flag and pass here, return 0 if false.
// TODO: this was an unbipped flag day soft fork, prior to BIP16/141.
Expand Down
2 changes: 1 addition & 1 deletion src/chain/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ constexpr bool is_multiple_sigop(opcode code) NOEXCEPT
return code == opcode::checkmultisig || code == opcode::checkmultisigverify;
}

// TODO: compute in script evaluation and add coinbase input scripts.
// TODO: compute in or at script evaluation and add coinbase input scripts.
// TODO: this precludes second deserialization of script for sigop counting.
size_t script::signature_operations(bool accurate) const NOEXCEPT
{
Expand Down
2 changes: 2 additions & 0 deletions src/chain/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,8 @@ code transaction::connect(const context& ctx) const NOEXCEPT
return ec;
}

// TODO: accumulate sigops from each connect result and add coinbase.
// TODO: return in override with out parameter. more impactful with segwit.
return error::transaction_success;
}

Expand Down

0 comments on commit bbf6bcf

Please sign in to comment.