Bitcoin Forum
May 06, 2024, 08:21:33 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Question about shy & simple pull requests  (Read 775 times)
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
March 22, 2013, 08:59:51 PM
 #1

I usually compile the client myself since I often have some small patches which I like to use.
I've always been shy to submit any poll request for such, mostly because I'm not really sure how welcome they  to be, and nobody likes being rejected Smiley

Let ma give you some example.
From time to time I get requests from people I know who have problems with their wallets and so they want me to fix it.
Usually it's because they used to work with several wallets at the same PC, and so they ended up with transactions that have only a question sign, and zero confirmations...
Normally I just tell them to use the "-rescan" option, but sometimes it doesn't help, because the transaction they have in the wallet was somehow a double-spend, and then the only way to fix their wallet is to remove all the transactions and then do the rescan.
So I have this simple patch in init.c, which goes like this:
Code:
bool AppInit2()
{
    // ...
    if (GetBoolArg("-rescan"))
    {
        pindexRescan = pindexGenesisBlock;
        // And here goes my code:
        if (GetBoolArg("-purgetransactions"))
        {
            for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
            {
                CWalletTx* wtx = &((*it).second);
                pwalletMain->EraseFromWallet(wtx->GetHash());
            }
        }
    }
    // ...
}
As you can figure, it basically removes all the local txs from the wallet, if you use both "-rescan" and "-purgetransactions" at the same time.

So: would it be useful enough to bother with a pull request?
And if it would - do I need to add some test cases for it, or what?


Another example, though a bit more complex, would be a possibility to use * as the <fromaccount> for sendmany command.
It's just weird that you cannot specify "any account" there, and I have an application that really sucks because of it.


If such a simple patches are be welcome, I'm more than happy to create some pull requests for them, but if not - no problem, I will just keep patching them in myself.
So please let me know what you think.

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
1714983693
Hero Member
*
Offline Offline

Posts: 1714983693

View Profile Personal Message (Offline)

Ignore
1714983693
Reply with quote  #2

1714983693
Report to moderator
Once a transaction has 6 confirmations, it is extremely unlikely that an attacker without at least 50% of the network's computation power would be able to reverse it.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1233


May Bitcoin be touched by his Noodly Appendage


View Profile
March 24, 2013, 04:02:15 PM
 #2

About your specific problem, if it's enough tested yeah I find it useful. I spent several hours to implement transactions support in pywallet because back in the days there was no way to delete those famous 0/unconfirmed transactions

I'm also wondering about the case of simple pull requests... What are the requirements to send some and it being accepted?
Make a successful thread about it in dev/tech discussion? Make theymos/Gavin/etc agreeing with you? Nothing? Luck? Prayers to Satoshi?

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



View Profile
March 24, 2013, 05:42:49 PM
 #3

About your specific problem, if it's enough tested yeah I find it useful. I spent several hours to implement transactions support in pywallet because back in the days there was no way to delete those famous 0/unconfirmed transactions

I'm also wondering about the case of simple pull requests... What are the requirements to send some and it being accepted?
Make a successful thread about it in dev/tech discussion? Make theymos/Gavin/etc agreeing with you? Nothing? Luck? Prayers to Satoshi?

No formal requirements, no formal process (that I've seen).

Make the pull request, people will see it, comment, etc.  If there are no big objections and at least a couple of ACKs, it'll get pulled.  Most of the discussion happens on the github page and in IRC.  Try to make sure your branch is correct and complete before you make the request.  If your patch is not totally trivial, you'll need to make some changes before it'll be accepted, but it looks bad when the build tester bot reports that your pullreq can't compile.

As for the two specific examples in this thread, I like the -purgetransaction option.  Personally, I'd prefer an RPC call that selectively removes one transaction without needing a restart, but this would still come in handy at times.  As for the source for sendmany, can't you just specify the default account with an empty string "" ?

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!