Skip to content

Commit f4dcad1

Browse files
committed
remove BRTransactionFee()
1 parent b1004f4 commit f4dcad1

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

BRTransaction.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -513,24 +513,6 @@ size_t BRTransactionSize(const BRTransaction *tx)
513513
return size;
514514
}
515515

516-
// the amount of the transaction fee for tx
517-
uint64_t BRTransactionFee(const BRTransaction *tx)
518-
{
519-
uint64_t amount = 0;
520-
521-
assert(tx != NULL);
522-
523-
for (size_t i = 0; tx && i < tx->inCount; i++) {
524-
amount += tx->inputs[i].amount;
525-
}
526-
527-
for (size_t i = 0; tx && i < tx->outCount && amount != UINT64_MAX; i++) {
528-
amount = (tx->outputs[i].amount <= amount) ? amount - tx->outputs[i].amount : UINT64_MAX;
529-
}
530-
531-
return amount;
532-
}
533-
534516
// minimum transaction fee needed for tx to relay across the bitcoin network
535517
uint64_t BRTransactionStandardFee(const BRTransaction *tx)
536518
{

BRTransaction.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ void BRTransactionShuffleOutputs(BRTransaction *tx);
122122

123123
// size in bytes if signed, or estimated size assuming compact pubkey sigs
124124
size_t BRTransactionSize(const BRTransaction *tx);
125-
126-
// the amount of the transaction fee for tx
127-
uint64_t BRTransactionFee(const BRTransaction *tx);
128125

129126
// minimum transaction fee needed for tx to relay across the bitcoin network
130127
uint64_t BRTransactionStandardFee(const BRTransaction *tx);

0 commit comments

Comments
 (0)