Bitcoin Forum
September 25, 2018, 08:19:15 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How to check my address balance in regtest?  (Read 130 times)
topflankerkiller
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
November 28, 2017, 09:03:07 AM
 #1

I have created a regtest address and I want to check it's balance.

I have run the commands:

-regtest generate 101
-regtest getbalance
-regtest sendtoaddress n4MN27Lk7Yh3pwfjCiAbRXtRVjs4Uk67fG 10.00
-regtest generate 6
-regtest getbalance n4MN27Lk7Yh3pwfjCiAbRXtRVjs4Uk67fG
after the 5th step the balance is still 0.

Why this happened since I have already sent 10 BTC to my address? Do I have to sign any outputs in order to claim the bitcoins?

https://i.stack.imgur.com/yoLwB.png
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1526
Merit: 1659


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


View Profile WWW
November 29, 2017, 06:02:56 AM
 #2

You are calling getbalance with a parameter. The parameter is for an account name, not an address. Accounts are different from addresses and wallets. They are a Bitcoin Core only internal thing. There is no way to get the balance of an address unless you add it to an account first.

topflankerkiller
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
December 18, 2017, 07:41:11 AM
 #3

Thanks!

But how can I add an address to an account in Bitcoin-core?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1526
Merit: 1659


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


View Profile WWW
December 18, 2017, 03:21:33 PM
 #4

But how can I add an address to an account in Bitcoin-core?
Don't. The account system is deprecated, counter intuitive, and broken.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!