forked from bitpay/bitcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Better architecture / code flow #6
Copy link
Copy link
Open
Description
A note to myself of how I'd like the usage of this to eventually be
My goal would be to make it to have custom plugins at different stages
import { Node } from 'bitcore-node';
const node = new Node(config);
// expose the services
node.services.storage.blocks
node.services.storage.transactions
node.services.storage.coins
node.services.storage.x
// some sort of block pipeline / middleware
node.providers.p2p.BTC.sync = pipe(
getHeadersFromMongo,
getHeadersToSyncFromChain,
getBlocksForHeaders,
convertBlocksToInternalFormat,
saveBlocksToMongo
);
node.providers.p2p.BTC.mempool.pipe(
convertToInternalFormat,
mongoPersistMempoolTx
)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels