Description

StoreBlock stores the provided block into the database. There are no checks to ensure the block connects to a previous block, contains double spends, or any additional functionality such as transaction indexing. It simply stores the block in the database.

The interface contract guarantees at least the following errors will be returned (other implementation-specific errors are possible):

- ErrBlockExists when the block hash already exists
- ErrTxNotWritable if attempted against a read-only transaction
- ErrTxClosed if the transaction has already been closed

Other errors are possible depending on the implementation.

StoreBlock is referenced in 2 repositories

github.com/btcsuite/btcd

...