Changeset View
Changeset View
Standalone View
Standalone View
chronik/chronik-cpp/chronik_bridge.h
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | public: | ||||
const CBlockIndex &lookup_block_index(std::array<uint8_t, 32> hash) const; | const CBlockIndex &lookup_block_index(std::array<uint8_t, 32> hash) const; | ||||
std::unique_ptr<CBlock> load_block(const CBlockIndex &bindex) const; | std::unique_ptr<CBlock> load_block(const CBlockIndex &bindex) const; | ||||
std::unique_ptr<CBlockUndo> | std::unique_ptr<CBlockUndo> | ||||
load_block_undo(const CBlockIndex &bindex) const; | load_block_undo(const CBlockIndex &bindex) const; | ||||
Tx load_tx(uint32_t file_num, uint32_t data_pos, uint32_t undo_pos) const; | |||||
rust::Vec<uint8_t> load_raw_tx(uint32_t file_num, uint32_t data_pos) const; | |||||
const CBlockIndex &find_fork(const CBlockIndex &index) const; | const CBlockIndex &find_fork(const CBlockIndex &index) const; | ||||
void lookup_spent_coins(Tx &, rust::Vec<OutPoint> ¬_found, | void lookup_spent_coins(Tx &, rust::Vec<OutPoint> ¬_found, | ||||
rust::Vec<OutPoint> &coins_to_uncache) const; | rust::Vec<OutPoint> &coins_to_uncache) const; | ||||
void uncache_coins(rust::Slice<const OutPoint>) const; | void uncache_coins(rust::Slice<const OutPoint>) const; | ||||
std::array<uint8_t, 32> broadcast_tx(rust::Slice<const uint8_t> raw_tx, | std::array<uint8_t, 32> broadcast_tx(rust::Slice<const uint8_t> raw_tx, | ||||
int64_t max_fee) const; | int64_t max_fee) const; | ||||
}; | }; | ||||
std::unique_ptr<ChronikBridge> make_bridge(const Config &config, | std::unique_ptr<ChronikBridge> make_bridge(const Config &config, | ||||
const node::NodeContext &node); | const node::NodeContext &node); | ||||
Tx bridge_tx(const CTransaction &tx, const std::vector<Coin> &spent_coins); | Tx bridge_tx(const CTransaction &tx, const std::vector<Coin> &spent_coins); | ||||
Block bridge_block(const CBlock &block, const CBlockUndo &block_undo, | Block bridge_block(const CBlock &block, const CBlockUndo &block_undo, | ||||
const CBlockIndex &bindex); | const CBlockIndex &bindex); | ||||
Tx load_tx(uint32_t file_num, uint32_t data_pos, uint32_t undo_pos); | |||||
rust::Vec<uint8_t> load_raw_tx(uint32_t file_num, uint32_t data_pos); | |||||
BlockInfo get_block_info(const CBlockIndex &index); | BlockInfo get_block_info(const CBlockIndex &index); | ||||
const CBlockIndex &get_block_ancestor(const CBlockIndex &index, int32_t height); | const CBlockIndex &get_block_ancestor(const CBlockIndex &index, int32_t height); | ||||
rust::Vec<uint8_t> compress_script(rust::Slice<const uint8_t> script); | rust::Vec<uint8_t> compress_script(rust::Slice<const uint8_t> script); | ||||
rust::Vec<uint8_t> decompress_script(rust::Slice<const uint8_t> compressed); | rust::Vec<uint8_t> decompress_script(rust::Slice<const uint8_t> compressed); | ||||
Show All 15 Lines |