Describe the setup
+------+ +---------+ +------+
|proxy | |node with| | RPC |
Internet ---|node P|---|wallet W |---|client|
|0.13.1| |0.13.1 | | R |
+------+ +---------+ +------+
\------------ LAN --------------/
bitcoin.conf from node W:
connect=<IP from P>:8333
[..]
Describe the issue
W is connected to P all the time. When R calls importprivkey on W, some time later while still rescanning, W will drop the connection to P with socket sending timeout (15:28:03).
W then tries to reconnect to P. Between establishing the TCP connection (15:28:07) and sending the version message from W to P (15:51:5) there is a delay of more than 20 minutes, resulting in the connection being dropped after trying to send the version message 20 minutes late (15:51:58).
In our case right after importing the private key a TX is generated on W but not being relayed to P (15:51:58) because of the 2nd disconnect. The TX is then only rebroadcasted another 20 minutes later (16:10:25).
Can you reliably reproduce the issue?
- Call
importprivkey - When finished, call
sendfrom
Expected behaviour
Connection from W to P should not be disconnected, the created TX being relayed from W to P immediately.
Actual behaviour
Connection from W to P gets disconnected. Relaying of created TX from W to P is delayed for ~20 minutes.
What version of bitcoin-core are you using?
v0.13.1.0-g03422e5
debug.log of W
(privkey is being imported)
2016-11-21 15:28:01 AddToWallet 4b..............................................................
2016-11-21 15:28:01 AddToWallet 7b..............................................................
2016-11-21 15:28:02 Still rescanning. At block 365458. Progress=0.613375
2016-11-21 15:28:03 socket sending timeout: 1201s
2016-11-21 15:28:03 disconnecting peer=1
2016-11-21 15:28:07 trying connection PROXYIP:8333 lastseen=0.0hrs
2016-11-21 15:28:07 Added connection to PROXYIP:8333 peer=2
2016-11-21 15:28:09 AddToWallet 5d..............................................................
2016-11-21 15:28:09 AddToWallet 30..............................................................
[..]
2016-11-21 15:51:57 AddToWallet 9e..............................................................
2016-11-21 15:51:58 AddToWallet 83..............................................................
2016-11-21 15:51:58 got inv: tx 0f0213b886bdd03ae131184d8edaeb1f75216cc25df00f4f1798f1cbcad69b5c new peer=1
2016-11-21 15:51:58 askfor witness-tx 0f0213b886bdd03ae131184d8edaeb1f75216cc25df00f4f1798f1cbcad69b5c 0 (00:00:00) peer=1
2016-11-21 15:51:58 send version message: version 70014, blocks=439941, us=[::]:0, them=0.0.0.0:0, peer=2
2016-11-21 15:51:58 sending: version (102 bytes) peer=2
2016-11-21 15:51:58 Erased 100 orphan tx from peer 1
2016-11-21 15:51:58 socket closed
2016-11-21 15:51:58 disconnecting peer=2
2016-11-21 15:51:58 keypool added key 7949, size=301
2016-11-21 15:51:58 keypool reserve 7649
2016-11-21 15:51:58 keypool keep 7649
[..]
2016-11-21 15:51:58 CommitTransaction
CTransaction(hash=ec6eXXXXXX, ver=1, vin.size=5, vout.size=2, nLockTime=439941)
[..]
2016-11-21 15:51:58 AddToWallet ec6eXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX new
2016-11-21 15:51:58 Blockpolicy mempool tx ec6eXXXXXX not adding
[..]
2016-11-21 15:52:01 Flushing wallet.dat
2016-11-21 15:52:01 Flushed wallet.dat 248ms
2016-11-21 15:52:03 trying connection PROXYIP:8333 lastseen=0.0hrs
2016-11-21 15:52:03 Added connection to PROXYIP:8333 peer=3
2016-11-21 15:52:03 send version message: version 70014, blocks=439941, us=[::]:0, them=0.0.0.0:0, peer=3
[..]
2016-11-21 16:10:25 Relaying wtx ec6eXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2016-11-21 16:10:25 ResendWalletTransactions: rebroadcast 1 unconfirmed transactions