Walletnotify hits twice, immediately

1

So I've read most of what is tagged with walletnotify, but haven't found a solution. I know walletnotify is supposed to run twice, one for the unconfirmed transaction and again, when it reaches 1 confirmation. For me, it runs twice, right off the bat.

bitcoin.conf:

server=1
daemon=1

maxconnections=12
maxuploadtarget=20
rpcuser=xxxx
rpcpassword=xxxx
testnet=1
rpcallowip=52.86.xx.xx
walletnotify=/home/scripts/transaction.sh %s
keypool=10000

transaction.sh:

#!/bin/sh
F=notify_log
D=`date +"%Y%m%d%H%M%S"`
echo ${D} - ${1} >> ${F}

Produces an output of:

20180126015435 - cf59f4c18a80773164c7efdf2a77722099722b3a61274f940aea52cbd600db2b
20180126015435 - cf59f4c18a80773164c7efdf2a77722099722b3a61274f940aea52cbd600db2b

Same TXID, same timestamp. But why twice?

Dawg

Posted 2018-01-26T01:59:42.687

Reputation: 11

Answers

2

walletnotify will execute every time you either

1.receive bitcoin
2.send bitcoin
3.when a bitcoin gets its first confirmation.

@Dawg are you transfer payment in your wallet it self ? if yes then OK , if not try to send/receive the payments from other bitcoin node then you can observe clearly ,Cheers

madan

Posted 2018-01-26T01:59:42.687

Reputation: 23

0

try it

#!/bin/bash
F=/home/btcdev/wallet_transaction_log
D=`date +"%Y%m%d%H%M%S"`
echo ${D} - ${1} >> ${F}

Ref: https://bitcointalk.org/index.php?topic=203438.0

madan

Posted 2018-01-26T01:59:42.687

Reputation: 23