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

Method get_tx_fee

src/Core/CryptoNoteTools.cpp:175–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175bool cn::get_tx_fee(const TransactionPrefix &tx, uint64_t *fee) {
176 uint64_t amount_in = get_tx_sum_inputs(tx);
177 uint64_t amount_out = get_tx_sum_outputs(tx);
178
179 if (amount_in < amount_out)
180 return false;
181 *fee = amount_in - amount_out;
182 return true;
183}
184
185uint64_t cn::get_tx_fee(const TransactionPrefix &tx) {
186 uint64_t r = 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected