-
Notifications
You must be signed in to change notification settings - Fork 173
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
RPC: Scanforunspent #1547
RPC: Scanforunspent #1547
Conversation
@cyrossignol Let's get this reviewed and merged today. I want to get this one done and also all of the stuff in the integrated_scraper_2 tracking PR, and then we are going to do an interim release. |
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 good. Should we create a subdirectory under the walletbackups directory to store this stuff, or maybe a new directory under the data directory, since people may have automated sweep scripts that would get confused by files other than wallet/conf file backups?
that is possible to do. i'll honour the -backupdir and just make a subdirectory within that. what should we call it? |
Perfect. |
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.
utACK
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.
Since we're already building up the UTXO list in txres
, we can support JSON export without much additional effort:
exportoutput << txres.write(2); // 2 = indent spacing
std::unordered_multimap<int64_t, std::pair<uint256, unsigned int>> uMultisig; | ||
|
||
LOCK(cs_main); | ||
{ |
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.
Can we move the LOCK
into the nested scope?
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.
yes i'll move in inward when i get back home
src/rpcrawtransaction.cpp
Outdated
{ | ||
if (nType == 0) | ||
{ | ||
exportoutput << spacing << "<tx" << nCount << ">\n"; |
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.
If we want to use XML for a machine-readable format, we may want to move nCount
into a child element:
<tx>
<num>1</num>
...
</tx>
...or an attribute:
<tx num="1">...</tx>
...or remove it altogether instead of appending it to the tag name. This prevents some XML parsers from logically grouping the <tx>
items into a list structure.
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.
originally i wanted by but can't have numbers in main part of tag. i'll play around with this idea
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.
num="1" doesnt do anything really but cleaner then <tx#> and probably better supported for xml parsers
…expected white space, and add id tag instead to xml
Added - Add testnet desktop launcher action for Linux #1516 (@caraka) - Shuffle vSideStakeAlloc if necessary to support sidestaking to more than 6 destinations #1532 (@jamescowens) - New Superblock format preparations for Fern #1526, #1542 (@jamescowens, @cyrossignol) - Multisigtools - Consolidate multisig unspent #1529 (@iFoggz) - Scanforunspent #1547 (@iFoggz) - consolidatemsunspent and scanforunspent bug fix #1561 (@iFoggz) - New banning misbehavior handling and Peers Tab on Debug Console #1537 (@jamescowens) - Reimplement getunconfirmedbalance rpc #1548 (@jamescowens) - Add CLI switch to display binary version #1553 (@cyrossignol) Changed - Select smallest coins for contracts #1519 (@iFoggz) - Move some functionality from miner to SelectCoinsForStaking + Respect the coin reserve setting + Randomize UTXO order #1525 (@iFoggz) - For voting - if url does not contain http then add it #1531 (@iFoggz) - Backport newer serialization facilities from Bitcoin #1535 (@cyrossignol) - Refactor ThreadSocketHandler2() Inactivity checks #1538 (@iFoggz) - Update outdated checkpoints #1539 (@barton2526) - Change needed to build Gridcoin for OSX using homebrew #1540 (@Git-Jiro) - Optimize scraper traffic for expiring manifests #1542 (@jamescowens) - Move legacy neural vote warnings to debug log level #1560 (@cyrossignol) - Change banlist save interval to 5 minutes #1564 (@jamescowens) - Change default rpcconsole.ui window size to better support new Peers tab #1566 (@jamescowens) Removed - Remove deprecated RSA weight and legacy kernel #1507 (@cyrossignol) Fixed - Clean up compiler warnings #1521 (@cyrossignol) - Handle missing external CPID in client_state.xml #1530 (@cyrossignol) - Support boost 1.70+ #1533 (@iFoggz) - Fix diagnostics failed to make connection to NTP server #1545 (@Git-Jiro) - Install manpages in correct system location #1546 (@Git-Jiro) - Fix ability to show help and version without a config file #1553 (@cyrossignol) - Refactor QT UI variable names to be more consistent, Fix Difficulty default #1563 (@barton2526) - Fix two regressions in previous UI refactor #1565 (@barton2526) - Fix "Owed" amount in output of "magnitude" RPC method #1569 (@cyrossignol)
Another RPC tool mainly aimed at multisig. I recently added a consolidation tool for multisig addresses however I felt this tool is also needed for managing multisig utxos. This tool is designed for scanning of a specified address for unspent utxos. This can also be used on non-multisig addresses as well. This tool also offers exporting of data into
txt
orxml
This uses some of the code works of consolidation of multisig utxos.
Added:
-backupdir
here is a rpc output from test
Output of a xml file:
Output of a txt file:
This will make the ease of use for foundation easier as we will be able to keep track and maintain foundation utxos more efficiently and effectively.