Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Commit

Permalink
Merge fce8723 into 96b4f36
Browse files Browse the repository at this point in the history
  • Loading branch information
vpulim committed Aug 9, 2018
2 parents 96b4f36 + fce8723 commit cffcd44
Show file tree
Hide file tree
Showing 4 changed files with 303 additions and 75 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ new Blockchain({db: db}).iterator('i', (block, reorg, cb) => {
- [`blockchain.putBlock(block, [cb])`](#blockchainputblockblock-cb)
- [`blockchain.getBlock(hash, [cb])`](#blockchaingetblockhash-cb)
- [`blockchain.getBlocks(blockId, maxBlocks, skip, reverse, [cb])`](#blockchaingetblocksblockid-maxblocks-skip-reverse-cb)
- [`blockchain.putHeaders(headers, [cb])`](#blockchainputheadersheaders-cb)
- [`blockchain.putHeader(header, [cb])`](#blockchainputheaderheader-cb)
- [`blockchain.selectNeededHashes(hashes, [cb])`](#blockchainselectneededhasheshashes-cb)
- [`blockchain.delBlock(blockHash, [cb])`](#blockchaindelblockblockhash-cb)
- [`blockchain.iterator(name, onBlock, [cb])`](#blockchainiteratorname-onblock-cb)
Expand Down Expand Up @@ -119,6 +121,19 @@ Looks up many blocks relative to blockId.

--------------------------------------------------------

#### `blockchain.putHeaders(headers, cb)`
Adds many headers to the blockchain.
- `headers` - the headers to be added to the blockchain
- `cb` - the callback. It is given two parameters `err` and the last of the saved `headers`
--------------------------------------------------------

#### `blockchain.putHeader(header, cb)`
Adds a header to the blockchain.
- `header` - the header to be added to the blockchain
- `cb` - the callback. It is given two parameters `err` and the saved `header`

--------------------------------------------------------

#### `blockchain.getDetails(hash, cb)`
[DEPRECATED] Returns an empty object

Expand Down
Loading

0 comments on commit cffcd44

Please sign in to comment.