github.com/neatlab/neatio@v1.7.3-0.20220425043230-d903e92fcc75/tests/difficulty_test_util.go (about)

     1  package tests
     2  
     3  import (
     4  	"math/big"
     5  
     6  	"github.com/neatlab/neatio/params"
     7  	"github.com/neatlab/neatio/utilities/common"
     8  	"github.com/neatlab/neatio/utilities/common/math"
     9  )
    10  
    11  //go:generate gencodec -type DifficultyTest -field-override difficultyTestMarshaling -out gen_difficultytest.go
    12  
    13  type DifficultyTest struct {
    14  	ParentTimestamp    *big.Int    `json:"parentTimestamp"`
    15  	ParentDifficulty   *big.Int    `json:"parentDifficulty"`
    16  	UncleHash          common.Hash `json:"parentUncles"`
    17  	CurrentTimestamp   *big.Int    `json:"currentTimestamp"`
    18  	CurrentBlockNumber uint64      `json:"currentBlockNumber"`
    19  	CurrentDifficulty  *big.Int    `json:"currentDifficulty"`
    20  }
    21  
    22  type difficultyTestMarshaling struct {
    23  	ParentTimestamp    *math.HexOrDecimal256
    24  	ParentDifficulty   *math.HexOrDecimal256
    25  	CurrentTimestamp   *math.HexOrDecimal256
    26  	CurrentDifficulty  *math.HexOrDecimal256
    27  	UncleHash          common.Hash
    28  	CurrentBlockNumber math.HexOrDecimal64
    29  }
    30  
    31  func (test *DifficultyTest) Run(config *params.ChainConfig) error {
    32  	return nil
    33  
    34  }