full node balance uncurrent (regtest) #11807

issue JokerCatz opened this issue on December 1, 2017
  1. JokerCatz commented at 9:25 AM on December 1, 2017: none

    just code ... I use Ruby , but I think it's simple to read

    # `` == call system , return stdout
    # system() == call system too , but return false if has stderr
    # "".strip == remove space & "\n"
    # [].sample == random pick
    # unless == if ! 
    
    cmd = "bitcoin-cli"
    
    #init chain
    `#{cmd} generate 101`
    
    addresses = []
    5.times do
      addresses << `#{cmd} getnewaddress`.strip
    end
    
    block = 101
    while block < 500
      5.times do
        unless system("#{cmd} sendtoaddress #{addresses.sample} 1")
          `#{cmd} generate 1`
          block += 1
        end
      end
      gencount = rand(10)
      if gencount == 0
        `#{cmd} generate 1`
        block += 1
      end
    end
    
    `#{cmd} generate 12`
    # ^ try to cleanup mempool ...

    my final balance is 162.51119684 (it randomly) , but if I restart node , balance show 3202.42966146 , show balance use command : getinfo (okay I know the command has warning ...)

    and I use this command to start full node (v150100) Linux amd64

    bitcoind -regtest -rpckeepalive=true -rpctimeout=30 -usehd=0 -upnp=0 -server=1 -checkblocks=16 -maxuploadtarget=10 -onlynet=ipv4 -connect=0 -whitelist=127.0.0.1 -maxorphantx=0 -maxmempool=5 -mempoolexpiry=0 -maxconnections=0 -dnsseed=0

    so~ this is bug? I don't know but I think I need report ...

  2. JokerCatz commented at 9:58 AM on December 1, 2017: none

    okay... I rechecked , it my fail ... I use -maxorphantx=0 -maxmempool=5 -mempoolexpiry=0 so the mempool is too small ... the miner can't load mempool to confirm and wallet will not load mempool as balance ...

  3. JokerCatz closed this on Dec 1, 2017

  4. MarcoFalke locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-29 03:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me