Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Wallet/RPC: sweepprivkeys method to scan UTXO set and send to local wallet #9152
Conversation
fanquake
added RPC/REST/ZMQ Wallet
labels
Nov 13, 2016
|
Concept ACK (Haven't really looked at the code). Possible extension: |
|
From a raw flow perspective, the generation of the sweep transaction is something that works from public information and should be possible on an online node without access to the private keys... so that one should be a 'createrawsweeptransaction' which takes a list of adresses/pubkeys/redeemscripts (and maybe private keys ... maybe some kind of BIP32 chain spec) and returns a transaction that spends all coins assigned to matching keys, potentially with arguments to limit the set of inputs collected. |
|
Hmm, what about extending RPC |
|
sweepprivkeys is intended for users, and not to import keys. Users should never use importprivkey. |
ryanofsky
added a commit
to ryanofsky/bitcoin
that referenced
this pull request
Dec 9, 2016
|
|
ryanofsky |
6494980
|
ryanofsky
referenced
this pull request
Dec 9, 2016
Closed
Make CCoinsViewCache::Cursor() return latest data #9306
ryanofsky
added a commit
to ryanofsky/bitcoin
that referenced
this pull request
Dec 15, 2016
|
|
ryanofsky |
59a77a6
|
ryanofsky
added a commit
to ryanofsky/bitcoin
that referenced
this pull request
Dec 19, 2016
|
|
ryanofsky |
ef97df2
|
luke-jr
added a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Dec 21, 2016
|
|
luke-jr |
155e1cf
|
luke-jr
added a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Dec 21, 2016
|
|
luke-jr |
f73bc4f
|
luke-jr
added a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Dec 21, 2016
|
|
luke-jr |
29caf46
|
ryanofsky
reviewed
Dec 28, 2016
Re: "Refactor sweepprivkeys to deal with CCoinsView::Cursor limitations," I think I could extend #9306 to return a working cursor for CCoinsViewMemPool, if that would help.
| + LOCK(cs_main); | ||
| + mempool.FindScriptPubKey(setscriptSearch, mapcoins); | ||
| + FlushStateToDisk(); | ||
| + pcoinsTip->FindScriptPubKey(setscriptSearch, mapcoins); |
ryanofsky
Dec 28, 2016
•
Contributor
It might be appropriate to loop over mapCoins calling CTxMemPool::pruneSpent, on each entry, to avoid trying to sweep from an output that is already in the process of being spent.
luke-jr
added a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Dec 31, 2016
|
|
luke-jr |
2d594e7
|
luke-jr
added a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Dec 31, 2016
|
|
luke-jr |
f3f5c79
|
ryanofsky
added a commit
to ryanofsky/bitcoin
that referenced
this pull request
Jan 2, 2017
|
|
ryanofsky |
96a1834
|
ryanofsky
added a commit
to ryanofsky/bitcoin
that referenced
this pull request
Jan 2, 2017
|
|
ryanofsky |
2ca75bc
|
luke-jr
added some commits
Nov 13, 2016
|
Concept ACK.
Please don't do this. People confuse |
laanwj
added this to the
0.15.0
milestone
Feb 27, 2017
ryanofsky
added a commit
to ryanofsky/bitcoin
that referenced
this pull request
Jun 2, 2017
|
|
ryanofsky |
d58b56d
|
ryanofsky
added a commit
to ryanofsky/bitcoin
that referenced
this pull request
Jun 12, 2017
|
|
ryanofsky |
095c2e7
|
|
Seems this won't be making it for 0.15. Untagging. |
luke-jr commentedNov 13, 2016
Does this look like a good approach?
TODO: