Make fee and timestamp in TransactionDetails Options#370
Make fee and timestamp in TransactionDetails Options#370afilini merged 1 commit intobitcoindevkit:masterfrom
Conversation
|
Great stuff! Do I understand correctly that this |
|
Concept ACK. Given that both height and timestamp will be |
yes, exactly
will do |
… Option confirmation_time contains both a block height and block timestamp and is Some only for confirmed transaction
| #[test] | ||
| #[serial] | ||
| fn test_sync_bump_fee_add_input() { | ||
| fn test_sync_bump_fee_add_input_simple() { |
There was a problem hiding this comment.
I added simple, because you can't launch tests singularly if they share a common prefix with others
|
ACK 0bbfa5f it's a little interesting that you have to have this |
|
I haven't reviewed the code thoroughly yet, but I'm assuming this affects the database representation of our structs somehow. What happens if I try to load a db created with the older version? |
If my test is correct it works and it simply initializes I used bdk-cli master, synced a wallet, then switched to this branch https://github.com/RCasatta/bdk-cli/tree/updated asked the balance of the same wallet, synced again and it works (my local bdk is on the options branch) |
Description
Make fields
fee(renamed fromfeesto be coherent with rpc) andtimestampOptionto better handle the missing information.Specify in docs
timestamprefer to the timestamp of the block the tx is included in (removed the initialization tonow()for sending tx)UPDATE: as per @LLFourn suggestion, timestamp and height have been grouped in the
confirmation_timefieldFix #369
Notes to the reviewers
all tests are modified to use
unwrap_or(0)in place wherefeewas usedIn case a tx is confirmed but later reorged and included in the reorged block at the same height, the timestamp will be wrong. The fix would be detrimental for performance in the most common cases so I didn't implement it.
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingBugfixes: