gottstech / gotts

A blockchain for non-collateralized stable-coins, follow MimbleWimble protocol but with explicit amount.
https://gotts.tech
Apache License 2.0
48 stars 4 forks source link

fix: wrong rebuild_height_pos_index on outputII pmmr #32

Closed garyyu closed 4 years ago

garyyu commented 4 years ago

Before this PR:

20191201 11:08:31.095 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(0867afae9b058c3ee161aec1163cffd1429e59c85196fc034d26a611cd3c978e33), 11, 1950)
20191201 11:08:31.095 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(09d217c803cf7d3393ba4b10cd03a79c11791607e4cb72608dc3b840369987cdd0), 12, 1950)
20191201 11:08:31.095 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(08cd91313693cbf4b8607f8568ee650c19e00ef8761bf9200b1c9eb4ce3aa08b4f), 16, 1950)
20191201 11:08:31.095 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(08e35827404671094257f000245ffb67c321da7f709d5bd611040268235a676f09), 17, 1950)
20191201 11:08:31.095 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(08099707d1466f60966de003a436cc64f55d7e95e081fe91e6f8e2789f9eba6092), 19, 1950)
20191201 11:08:31.095 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(09a9f15bc3ce743a9ec19099a19d78f9d8f302da53a5ad980db425d37c3f42a574), 20, 1950)
20191201 11:08:31.095 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(092b759988af369e7301721a48d0de5042f89cb9ff2943e2581a52c4cec45c7133), 23, 1950)
20191201 11:08:31.095 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(09e679e74bfa96abd7fad77e2346f28d76f33d83c3efc50e84a638bdc32082392b), 24, 1950)

After this fixing:

20191203 09:36:29.036 DEBUG gotts_chain::txhashset::txhashset - rebuild_height_pos_index: rebuilding 331 OutputII outputs position & height...
20191203 09:36:29.038 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(0867afae9b058c3ee161aec1163cffd1429e59c85196fc034d26a611cd3c978e33), 11, 480)
20191203 09:36:29.038 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(09d217c803cf7d3393ba4b10cd03a79c11791607e4cb72608dc3b840369987cdd0), 12, 482)
20191203 09:36:29.038 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(08cd91313693cbf4b8607f8568ee650c19e00ef8761bf9200b1c9eb4ce3aa08b4f), 16, 737)
20191203 09:36:29.039 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(08e35827404671094257f000245ffb67c321da7f709d5bd611040268235a676f09), 17, 1042)
20191203 09:36:29.039 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(08099707d1466f60966de003a436cc64f55d7e95e081fe91e6f8e2789f9eba6092), 19, 1046)
20191203 09:36:29.039 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(09a9f15bc3ce743a9ec19099a19d78f9d8f302da53a5ad980db425d37c3f42a574), 20, 1046)
20191203 09:36:29.039 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(092b759988af369e7301721a48d0de5042f89cb9ff2943e2581a52c4cec45c7133), 23, 1103)
20191203 09:36:29.039 TRACE gotts_chain::txhashset::txhashset - rebuild_height_pos_index: (Commitment(09e679e74bfa96abd7fad77e2346f28d76f33d83c3efc50e84a638bdc32082392b), 24, 1103)