-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(coinjoin): refactor Wallet #191
Conversation
64dac26
to
6180554
Compare
* remove from Wallet
* support empty wallet on unmixed or mixed funds only
Codecov ReportBase: 46.44% // Head: 46.47% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## feature-coinjoin #191 +/- ##
======================================================
+ Coverage 46.44% 46.47% +0.02%
- Complexity 6002 6093 +91
======================================================
Files 416 423 +7
Lines 44643 45181 +538
Branches 6249 6294 +45
======================================================
+ Hits 20734 20997 +263
- Misses 21588 21856 +268
- Partials 2321 2328 +7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
message CoinJoin { | ||
// key chain | ||
repeated Key key = 1; | ||
// last value of rounds from mixing | ||
required int32 rounds = 2; | ||
} |
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.
rounds
is used to calculate the balance of coinjoin coins.
if all coins were mixed for 4 rounds, but the rounds = 5
then the coinjoin balance will be zero. This value needs to persist.
public class WalletEx extends Wallet { | ||
private static final Logger log = LoggerFactory.getLogger(WalletEx.class); |
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.
WalletEx
is a temporary name.
public interface CoinJoinOrBuilder extends | ||
// @@protoc_insertion_point(interface_extends:wallet.CoinJoin) | ||
com.google.protobuf.MessageLiteOrBuilder { | ||
|
||
/** | ||
* <pre> |
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 wonder why the bitcoinj
developers like this autogenerated file to be committed into the repo.
@@ -93,7 +93,7 @@ public void setUp(BlockStore blockStore) throws Exception { | |||
// Reduce the number of keys we need to work with to speed up these tests. | |||
KeyChainGroup kcg = KeyChainGroup.builder(UNITTEST).lookaheadSize(4).lookaheadThreshold(2). | |||
fromRandom(Script.ScriptType.P2PKH).build(); | |||
wallet = new Wallet(UNITTEST, kcg); | |||
wallet = createWallet(kcg); |
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.
We need to allow derived classes to create their own wallet objects.
8b88297
to
2583b05
Compare
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.
Looks like great work.
Issue being fixed or feature implemented
What was done?
CoinJoinExtension
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only