Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

BitcoinCoreInterface now guarentees that unconfirmfun() will always b… #438

Merged
merged 1 commit into from
Mar 27, 2016

Conversation

chris-belcher
Copy link
Collaborator

…e invoked, issue #436

How this works: The list txnotify_fun now has elements which are 4-tuples instead of 3-tuples. The added tuple element is a boolean that remembers whether unconfirmfun() has been called yet. If it hasn't when the confirmed transaction is seen then call it.

Merging into develop this time. Please test. One thing that can be done is editing the True/False boolean part to make it as if unconfirmfun() hadn't been called yet.

@raedah
Copy link
Contributor

raedah commented Feb 29, 2016

Is this related to how 'on_tx_confirmed' calls 'on_tx_unconfirmed' in the ygs? Will it fix it so it doesnt do that anymore?

@chris-belcher
Copy link
Collaborator Author

Not really @raedah thats just to reuse lines of code. But it will fix forever those bugs where unconfirm_fun() is sometimes never called which leads to a crash in confirm_fun()

@dreboli
Copy link

dreboli commented Feb 29, 2016

bitcoind -prune=550 -daemon -proxy=127.0.0.1:9050 -pid=/home/pi/bitcoind.pid -datadir=/home/pi/.bitcoin/ -dbcache=4 -checkblocks=1 -blocksonly=1

git clone -b develop https://github.com/JoinMarket-Org/joinmarket.git
$ python wallet-tool.py wallet.json 
2016-03-01 00:37:15,786 [MainThread  ] [DEBUG]  hello joinmarket
Traceback (most recent call last):
  File "wallet-tool.py", line 89, in <module>
    load_program_config()
  File "/home/.../joinmarket/configure.py", line 220, in load_program_config
    global_singleton.config)
  File "/home/.../joinmarket/configure.py", line 241, in get_blockchain_interface_instance
    bitcoin_cli_cmd = _config.get("BLOCKCHAIN", "bitcoin_cli_cmd").split(' ')
  File "/usr/lib/python2.7/ConfigParser.py", line 618, in get
    raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'bitcoin_cli_cmd' in section: 'BLOCKCHAIN'

Yesterday's git cloned master works fine.

@chris-belcher
Copy link
Collaborator Author

@dreboli just so we understand, that error is unrelated to this PR ?

To fix your crash, I'd say set blockchain_source = bitcoin-rpc in joinmarket.cfg which is probably what you actually intended.

blockchain_source = json-rpc is an old obsolete option (which we should probably remove now that it's causing confusion)

@dreboli
Copy link

dreboli commented Mar 1, 2016

I thought it's related and didn't really know where to report it (and I don't really know how github works either).
But blockchain_source = bitcoin-rpc solved the problem, thanks.

@chris-belcher
Copy link
Collaborator Author

I tested this by commenting out the relevant lines in the unconfirmfun part. It's hard to test with the regtest setup we have and making a unconfirmed notification happen.
I suggest we merge.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants