Basic bitcoind/romanz-electrum support to sync the mempool and blocks.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Transaction, TransactionExtended, TransactionStripped } from '../interfaces';
|
||||
import { TransactionExtended, TransactionStripped } from '../interfaces';
|
||||
|
||||
export class Common {
|
||||
static median(numbers: number[]) {
|
||||
@@ -53,7 +53,7 @@ export class Common {
|
||||
txid: tx.txid,
|
||||
fee: tx.fee,
|
||||
weight: tx.weight,
|
||||
value: tx.vin.reduce((acc, vin) => acc + (vin.prevout ? vin.prevout.value : 0), 0),
|
||||
value: tx.vout ? tx.vout.reduce((acc, vout) => acc + (vout.value ? vout.value : 0), 0) : 0,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user