Port of stratx implementation of sweep#236
Conversation
| } | ||
|
|
||
| /// <inheritdoc /> | ||
| public IEnumerable<string> Sweep(IEnumerable<string> privateKeys, string destAddress, bool broadcast) |
There was a problem hiding this comment.
Good job.
I wonder if the Sweep has to be part of the WalletManager?
It could get its own class for sweeping that asks the manager for next address.
This will pollute less the manager which is already massive.
Thoughts? (also for @zeptin )
There was a problem hiding this comment.
Good question. I was wondering the same thing myself. StratX has a separate layer that we don't have called WalletService. Putting it in manager like I did effectively couples WalletManager with BlockStore which I'm not sure is bad or irrelevant. Not sure what kind of wallet you can have a wallet without a blockstore. Open to suggestions. If you think a separate dependency in the wallet feature is better I can go with that.
dangershony
left a comment
There was a problem hiding this comment.
While it would be good to put the code in a new class (not wallet manager) this looks fine.
|
@xandronus you want to change this from draft? |
This should be pretty close to the implemenation @zeptin did here stratisproject/StratisFullNode@809186d
Gonna mark this as draft as I still need to test and I think I should probably implement segwit addresses as well but open to initial feedback.