rpctest: Update for removal of wire.BlockVersion
This adds constant for the block version to the rpctest package since it is no longer available via the wire package due to the new BIP0009 code.
This commit is contained in:
parent
c440584efc
commit
25520b40ad
2 changed files with 7 additions and 3 deletions
|
@ -30,6 +30,10 @@ const (
|
|||
maxPeerPort = 35000
|
||||
minRPCPort = maxPeerPort
|
||||
maxRPCPort = 60000
|
||||
|
||||
// BlockVersion is the default block version used when generating
|
||||
// blocks.
|
||||
BlockVersion = 4
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -377,7 +381,7 @@ func (h *Harness) GenerateAndSubmitBlock(txns []*btcutil.Tx, blockVersion int32,
|
|||
defer h.Unlock()
|
||||
|
||||
if blockVersion == -1 {
|
||||
blockVersion = wire.BlockVersion
|
||||
blockVersion = BlockVersion
|
||||
}
|
||||
|
||||
prevBlockHash, prevBlockHeight, err := h.Node.GetBestBlock()
|
||||
|
|
|
@ -363,9 +363,9 @@ func testGenerateAndSubmitBlock(r *Harness, t *testing.T) {
|
|||
"expected %v, got %v", numTxns+1, numBlocksTxns)
|
||||
}
|
||||
blockVersion := block.MsgBlock().Header.Version
|
||||
if blockVersion != wire.BlockVersion {
|
||||
if blockVersion != BlockVersion {
|
||||
t.Fatalf("block version is not default: expected %v, got %v",
|
||||
wire.BlockVersion, blockVersion)
|
||||
BlockVersion, blockVersion)
|
||||
}
|
||||
|
||||
// Next generate a block with a "non-standard" block version along with
|
||||
|
|
Loading…
Add table
Reference in a new issue