diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-12-05 21:57:56 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-12-05 21:58:27 +0200 |
commit | 7ee0abe5a65d12a50c5169bf93bef8113469f975 (patch) | |
tree | 3e742a2c53b35620d28b9003a6788e80a8651024 /src/blockchain_utilities/blockchain_dump.cpp | |
parent | Merge pull request #515 (diff) | |
parent | blockchain_db: make the indexing base a BlockchainDB virtual function (diff) | |
download | monero-7ee0abe5a65d12a50c5169bf93bef8113469f975.tar.xz |
Merge pull request #517
a3c5ca0 blockchain_db: make the indexing base a BlockchainDB virtual function (moneromooo-monero)
a702118 blockchain_dump: fix output key dump for BDB 1-based indices (moneromooo-monero)
3bf35e1 db_bdb: read 32 bit heights from keys (moneromooo-monero)
Diffstat (limited to 'src/blockchain_utilities/blockchain_dump.cpp')
-rw-r--r-- | src/blockchain_utilities/blockchain_dump.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/blockchain_utilities/blockchain_dump.cpp b/src/blockchain_utilities/blockchain_dump.cpp index f3666c72b..f5f0986ec 100644 --- a/src/blockchain_utilities/blockchain_dump.cpp +++ b/src/blockchain_utilities/blockchain_dump.cpp @@ -256,6 +256,7 @@ int main(int argc, char* argv[]) boost::filesystem::path folder(m_config_folder); folder /= db->get_db_name(); const std::string filename = folder.string(); + uint64_t base_idx = db->get_indexing_base(); LOG_PRINT_L0("Loading blockchain from folder " << filename << " ..."); try @@ -386,7 +387,7 @@ int main(int argc, char* argv[]) { try { - tx_out_index toi = db->get_output_tx_and_index_from_global(idx); + tx_out_index toi = db->get_output_tx_and_index_from_global(idx + base_idx); start_struct(d, boost::lexical_cast<std::string>(idx)); write_pod(d, "tx_hash", string_tools::pod_to_hex(toi.first)); write_pod(d, "tx_index", string_tools::pod_to_hex(toi.second)); @@ -406,7 +407,7 @@ int main(int argc, char* argv[]) { try { - output_data_t od = db->get_output_key(idx); + output_data_t od = db->get_output_key(idx + base_idx); start_struct(d, boost::lexical_cast<std::string>(idx)); write_pod(d, "pubkey", string_tools::pod_to_hex(od.pubkey)); write_pod(d, "unlock_time", od.unlock_time); |