-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat(BUX-291): adjust tx recording to BEEF requirements #450
feat(BUX-291): adjust tx recording to BEEF requirements #450
Conversation
471d187
to
b09677a
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## rc-beef-v1-payments #450 +/- ##
=======================================================
- Coverage 52.78% 52.50% -0.29%
=======================================================
Files 101 106 +5
Lines 10855 11153 +298
=======================================================
+ Hits 5730 5856 +126
- Misses 4674 4828 +154
- Partials 451 469 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
46ff1b7
to
6c5489d
Compare
} | ||
} | ||
if txInfo.MerkleProof != nil { | ||
mp := MerkleProof(*txInfo.MerkleProof) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would create submethod here or sth to do all of MekleRoot related stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it, let me know what do you think about it
record_tx.go
Outdated
XPubKey: xPubKey, | ||
} | ||
} else { | ||
tx, err := getTransactionByHex(ctx, c, txHex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me to make this code more self descriptive it would be nice if in this if/else (especially in else) create a smaller method/function to handle this code and it's name should tell us what it is exactly doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it... TBH I don't think it's better now but have no idea how make it better
model_transactions_test.go
Outdated
@@ -743,7 +757,19 @@ func (ts *EmbeddedDBTestSuite) TestTransaction_Save() { | |||
// add the IN transaction | |||
transactionIn := newTransaction(testTx2Hex, append(tc.client.DefaultModelOptions(), New())...) | |||
require.NotNil(t, transactionIn) | |||
// TODO: move this to one place |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment regarding TODOs/questions left as comments:
First category of TODOs
I would segregate the TODOs into ones you didn't find answers to but are key to closing this shuffle. Then team members could help you investigate.
For example:
https://github.com/BuxOrg/bux/pull/450/files#diff-e28c902ea80bcbe696ef6a0172e5c5cf443846c446de2830367cd36e192da4b0R124
Second category of TODOs
The second category of TODOs are those that we will not currently resolve but do not block the pull request merge.
In this case, I would create a task in Jira that contains the appropriate subtasks associated with the specific problem.
I don't mind leaving the TODOs as they are:
// TODO: BUX-XXX check if we can ommit broadcasting here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO you referred to is not mine - I just moved this function from one file to another. I removed all TODOs and questions added by me.
BTW. if you think this function should go back to its previous file let me know.
168b2be
to
844cc72
Compare
action_transaction.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs:
I would definitely go here:
https://github.com/bitcoin-sv/bux-docs/tree/main/transactions
and check if we can update current docs.
The most important thing for me is transaction flow diagram.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Epic work 💪
3149f56
to
4cafaf3
Compare
…x_service _processInputs()
…EF to be more coherent
cf413a1
to
989dd4c
Compare
Motivation
We need to modify the synchronization and broadcasting mechanisms to align with BEEF payment requirements. Additionally, we seek greater control over the flow of sending and receiving transactions to facilitate future maintenance and development.
Solution
Pull Request Checklist