MCPcopy Create free account
hub / github.com/bcndev/bytecoin / next_stack_index_for_amount

Method next_stack_index_for_amount

src/Core/BlockChainState.cpp:90–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90size_t BlockChainState::DeltaState::next_stack_index_for_amount(Amount amount) const {
91 auto pg = m_parent_state->next_stack_index_for_amount(amount);
92 auto git = m_global_amounts.find(amount);
93 return (git == m_global_amounts.end()) ? pg : git->second.size() + pg;
94}
95
96// We do not allow reading outputs added in the context of this delta state
97// Thus we enforce no dependent transactions in the same block (order can still affect future blocks)

Callers 1

push_amount_outputMethod · 0.80

Calls 5

write_varint_sqlite4Function · 0.85
read_varint_sqlite4Function · 0.50
endMethod · 0.45
sizeMethod · 0.45
rbeginMethod · 0.45

Tested by

no test coverage detected