Basic bitcoind/romanz-electrum support to sync the mempool and blocks.

This commit is contained in:
softsimon
2020-12-20 22:36:36 +07:00
parent 00244b706d
commit aabdaea47b
12 changed files with 393 additions and 38 deletions

View File

@@ -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,
};
}
}