[prev in list] [next in list] [prev in thread] [next in thread] 

List:       btcd-commits
Subject:    [conformal/btcchain] dbca1d: Add a new behavior flag to provide a dry run.
From:       Dave Collins <davec () conformal ! com>
Date:       2014-06-29 22:51:35
Message-ID: 53b09877c270e_23bfd99d38897fc () hookshot-fe2-cp1-prd ! iad ! github ! net ! mail
[Download RAW message or body]


  Branch: refs/heads/master
  Home:   https://github.com/conformal/btcchain
  Commit: dbca1d59c3dc48088654eaddbadfe038f245ccad
      https://github.com/conformal/btcchain/commit/dbca1d59c3dc48088654eaddbadfe038f245ccad
  Author: Dave Collins <davec@conformal.com>
  Date:   2014-06-29 (Sun, 29 Jun 2014)

  Changed paths:
    M accept.go
    M chain.go
    M error.go
    M error_test.go
    M process.go
    M txlookup.go
    M validate.go

  Log Message:
  -----------
  Add a new behavior flag to provide a dry run.

This commit adds a new behavior flag, BFDryRun which allows the caller
to indicate all checks should be performed against the block as normal
except it will not modify any state.  This is useful to test that a block
is valid without actually modifying the current chain or memory state.

This commit also adds a few additional checks which were elided before
since they are implicitly handled by btcwire.  However, with the ability
to propose blocks which didn't necessarily come through the btcwire path,
these checks need to be enforced in the chain code as well.

As a part of adding the checks, three new error codes named
ErrBlockTooBig, ErrTooManyTransactions, and ErrTxTooBig have been
introduced.

Closes #5.




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic