Skip to content

fix(metadata): actually use None for unset height#671

Merged
msbrogli merged 1 commit intomasterfrom
fix/height-none-not-used-by-default
Jun 15, 2023
Merged

fix(metadata): actually use None for unset height#671
msbrogli merged 1 commit intomasterfrom
fix/height-none-not-used-by-default

Conversation

@jansegre
Copy link
Member

@jansegre jansegre commented Jun 15, 2023

Acceptance criteria

  • use None instead of 0 in BaseTransaction.get_metadata when creating a new TransactionMetadata
  • add validations to save/get on TransactionStorage so we make sure blocks always have a height when being saved

@jansegre jansegre requested a review from msbrogli as a code owner June 15, 2023 18:43
@jansegre jansegre self-assigned this Jun 15, 2023
@jansegre jansegre force-pushed the fix/height-none-not-used-by-default branch from 1df9531 to ae441ba Compare June 15, 2023 18:50
@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Merging #671 (ae441ba) into master (441c255) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #671      +/-   ##
==========================================
+ Coverage   83.84%   83.91%   +0.06%     
==========================================
  Files         246      246              
  Lines       20340    20365      +25     
  Branches     2746     2749       +3     
==========================================
+ Hits        17055    17090      +35     
+ Misses       2712     2705       -7     
+ Partials      573      570       -3     
Impacted Files Coverage Δ
hathor/transaction/base_transaction.py 90.62% <100.00%> (+0.01%) ⬆️
hathor/transaction/storage/transaction_storage.py 91.04% <100.00%> (-0.02%) ⬇️

... and 11 files with indirect coverage changes

@msbrogli msbrogli force-pushed the fix/height-none-not-used-by-default branch from ae441ba to a651eb1 Compare June 15, 2023 19:38
@msbrogli msbrogli merged commit a651eb1 into master Jun 15, 2023
@msbrogli msbrogli deleted the fix/height-none-not-used-by-default branch June 15, 2023 19:38
@jansegre jansegre mentioned this pull request Jul 12, 2023
2 tasks
This was referenced Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants