| 562 | } |
| 563 | |
| 564 | void BlockChain::store_header(const Hash &bid, const api::BlockHeader &header) { |
| 565 | auto key = HEADER_PREFIX + DB::to_binary_key(bid.data, sizeof(bid.data)) + HEADER_SUFFIX; |
| 566 | BinaryArray ba = seria::to_binary(header); |
| 567 | m_db.put(key, ba, true); |
| 568 | } |
| 569 | |
| 570 | const api::BlockHeader *BlockChain::read_header_fast(const Hash &bid, Height hint) const { |
| 571 | if (get_tip_height() != Height(-1) && hint <= get_tip_height() && |