diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp.patch b/src/blockchain_db/lmdb/db_lmdb.cpp.patch index 2a5eb19..f1235dc 100644 --- a/src/blockchain_db/lmdb/db_lmdb.cpp.patch +++ b/src/blockchain_db/lmdb/db_lmdb.cpp.patch @@ -35,10 +35,11 @@ return; } // Note that there was a schema change within version 0 as well. -@@ -5227,5 +5230,6 @@ void BlockchainLMDB::migrate_4_5() +@@ -5227,6 +5230,7 @@ void BlockchainLMDB::migrate_4_5() bi.bi_hash = bi_old->bi_hash; bi.bi_cum_rct = bi_old->bi_cum_rct; bi.bi_long_term_block_weight = bi_old->bi_long_term_block_weight; + memset(&bi.bi_pricing_record, 0, sizeof(offshore::pricing_record)); MDB_val_set(nv, bi); + result = mdb_cursor_put(c_cur, (MDB_val *)&zerokval, &nv, MDB_APPENDDUP); diff --git a/src/offshore/offshore_structs.h b/src/offshore/offshore_structs.h index 8d11ff3..1692fc0 100644 --- a/src/offshore/offshore_structs.h +++ b/src/offshore/offshore_structs.h @@ -26,29 +26,30 @@ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +#include #include "common/pod-class.h" namespace offshore { #pragma pack(push, 1) POD_CLASS pricing_record { - double xAG; - double xAU; - double xAUD; - double xBTC; - double xCAN; - double xCHF; - double xCNY; - double xEUR; - double xGBP; - double xJPY; - double xNOK; - double xNZD; - double xUSD; - double unused1; - double unused2; - double unused3; - char signature[32]; + uint64_t xAG; + uint64_t xAU; + uint64_t xAUD; + uint64_t xBTC; + uint64_t xCAN; + uint64_t xCHF; + uint64_t xCNY; + uint64_t xEUR; + uint64_t xGBP; + uint64_t xJPY; + uint64_t xNOK; + uint64_t xNZD; + uint64_t xUSD; + uint64_t unused1; + uint64_t unused2; + uint64_t unused3; + char signature[64]; }; #pragma pack(pop) } diff --git a/src/offshore/pricing_handler.cpp b/src/offshore/pricing_handler.cpp index 11b105f..9786f46 100644 --- a/src/offshore/pricing_handler.cpp +++ b/src/offshore/pricing_handler.cpp @@ -31,7 +31,7 @@ namespace offshore { PricingHandler::PricingHandler() - : m_current_record{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, "\0"} + : m_current_record{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "\0"} { }