Fix incorrect checkpoint data for testnet3 #4184

pull dajohi wants to merge 1 commits into bitcoin:master from dajohi:master changing 1 files +2 −2
  1. dajohi commented at 8:40 PM on May 13, 2014: contributor

    No description provided.

  2. Fix incorrect checkpoint data for testnet3 122549f6de
  3. BitcoinPullTester commented at 9:31 PM on May 13, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/122549f6dee5f4d4daf7091d6302c38ba13ffb01 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  4. laanwj commented at 9:05 AM on May 14, 2014: member

    What steps did you take to get this information? How to verify this?

  5. laanwj added the label Bug on May 14, 2014
  6. dajohi commented at 2:57 PM on May 14, 2014: contributor

    getblock 000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70 (checkpoint 546) shows time of "1337966069".

    Regarding the total number of TXs, I wrote code to check:

    package main
    
    import (
            "fmt"
            "github.com/conformal/btcrpcclient"
    )
    
    var (
            client *btcrpcclient.Client
    )
    
    func CountTxs(count int64) (uint64, error) {
            totalTxs := uint64(0)
            for i := int64(0); i <= count; i++ {
                    sha, err := client.GetBlockHash(i)
                    if err != nil {
                            return 0, err
                    }
                    blk, err := client.GetBlock(sha)
                    if err != nil {
                            return 0, err
                    }
                    txs := len(blk.Transactions())
                    totalTxs += uint64(txs)
            }
            return totalTxs, nil
    }
    
    func main() {
        var err error
            cfg := btcrpcclient.ConnConfig{
                    Host:         "127.0.0.1:18332",  // testnet
                    User:         "dajohi",
                    Pass:         "mypass",
                    HttpPostMode: true,
                    DisableTLS:   true,
            }
            client, err = btcrpcclient.New(&cfg, nil)
            if err != nil {
                    fmt.Printf("%v\n", err)
                    return
            }
    
    
            total, err := CountTxs(546)
            if err != nil {
                    fmt.Printf("CountTxs error: %v\n", err)
                    return
            }
            fmt.Printf("total txs: %d\n", total)
    }
    

    <pre> $ go run txcount.go total txs: 1488 </pre>

  7. laanwj commented at 8:11 AM on May 28, 2014: member

    ACK

    from __future__ import division,print_function
    from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
    import sys
    
    tgt = sys.argv[1]
    count_to = int(sys.argv[2])
    proxy = AuthServiceProxy(tgt)
    total = 0
    
    for block in range(count_to+1):
        blockhash = proxy.getblockhash(block)
        info = proxy.getblock(blockhash)
        total += len(info['tx'])
    
    print('Total transactions:', total)
    print('Time of last block:', info['time'])
    
    $ python count_transactions.py http://bitcoinrpc:AbmPZxYieDW6DosvA8S3VjCA7zb3mi49h4HqzdDJXvQ@127.0.0.1:18332 546
    Total transactions: 1488
    Time of last block: 1337966069
    
  8. laanwj merged this on May 28, 2014
  9. laanwj closed this on May 28, 2014

  10. laanwj referenced this in commit 37634587a7 on May 28, 2014
  11. DrahtBot locked this on Sep 8, 2021

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:16 UTC

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