Vagabond
Vagabond

Reputation: 286

bitcoind not get transactions

I create new VPS on vultr, then I setup bitcoind as follow: https://www.ringingliberty.com/bitcoin/

In bitcoin.conf

rpcuser=bitcoinrpc
rpcpassword=<snip>
daemon=1
rpctimeout=30
rpcport=8332
rpcallowip=my_vps_ip
gen=0
keypool=100

I use https://github.com/aceat64/EasyBitcoin-PHP

My code PHP

$account = 'string_random';
$bitcoin  = new Bitcoin();
$sign_1   = $bitcoin->getnewaddress($account);
$sign_2   = $bitcoin->getnewaddress($account);
$multisig = $bitcoin->createmultisig(1, [$sign_1, $sign_2]);

I get address from: $multisig['address'] and then used wallet blockchain.info send bitcoin to it.

But, when I login to ssh and check:

bitcoin-cli listtransactions result is []

bitcoin-cli getbalance is 0.000

Where I am wrong?

Upvotes: 1

Views: 1000

Answers (1)

Krzysztof Raciniewski
Krzysztof Raciniewski

Reputation: 4924

Fist you should encrypt your wallet:

bitcoin-cli encryptwallet 'yourpassphrasehere'

After that your bitcoind must synchronize with network(get all blocks)

Run command:

bitcoin-cli getinfo

and see how many blocks are synchronized:

{
  "version": 130200,
  "protocolversion": 70015,
  "walletversion": 60000,
  "balance": 0.00455069,
  "blocks": 451571,    < ------------------
  "timeoffset": 0,
  "connections": 1,
  "proxy": "127.0.0.1:9050",
  "difficulty": 392963262344.3704,
  "testnet": false,
  "keypoololdest": 1485982350,
  "keypoolsize": 87610,
  "unlocked_until": 0,
  "paytxfee": 0.00000000,
  "relayfee": 0.00001000,
  "errors": ""
}

If number of blocks is equal to this value: https://blockexplorer.com/api/status?q=getBlockCount

you're ready to receive new payments.

if the amount is not equal, you can start bitcoind with option 'reindex' to force indexing blocks from the beginning.

Monitor your disk resources, because bitcoind need a lot of disk space to work. You can save disk space by using the parameter prune in bitcoind configuration file(read more in google about pruning mode).

You should increase listen nodes limit(I increase limit value to 30). This operation should speed up synchronization process:

listen=30

Good luck.

Upvotes: -1

Related Questions