OSDN Git Service

fix ci
authorpaladz <453256728@qq.com>
Mon, 25 Nov 2019 03:01:07 +0000 (11:01 +0800)
committerpaladz <453256728@qq.com>
Mon, 25 Nov 2019 03:01:07 +0000 (11:01 +0800)
proposal/proposal.go
test/bench_blockchain_test.go
test/performance/mining_test.go

index 622e1f1..af98f2c 100644 (file)
@@ -44,8 +44,8 @@ type blockBuilder struct {
 
        warnTimeoutCh     <-chan time.Time
        criticalTimeoutCh <-chan time.Time
-       gasLeft           int64
        timeoutStatus     uint8
+       gasLeft           int64
 }
 
 func newBlockBuilder(chain *protocol.Chain, accountManager *account.Manager, timestamp uint64, warnDuration, criticalDuration time.Duration) *blockBuilder {
index 2d24dc7..34271e6 100644 (file)
@@ -159,7 +159,7 @@ func InsertChain(chain *protocol.Chain, txPool *protocol.TxPool, txs []*types.Tx
                }
        }
 
-       block, err := proposal.NewBlockTemplate(chain, nil, uint64(time.Now().UnixNano()/1e6), time.Minute)
+       block, err := proposal.NewBlockTemplate(chain, nil, uint64(time.Now().UnixNano()/1e6), time.Minute, time.Minute)
        if err != nil {
                return err
        }
index 72cb004..d172973 100644 (file)
@@ -26,6 +26,6 @@ func BenchmarkNewBlockTpl(b *testing.B) {
 
        b.ResetTimer()
        for i := 0; i < b.N; i++ {
-               proposal.NewBlockTemplate(chain, accountManager, uint64(time.Now().UnixNano()/1e6), time.Minute)
+               proposal.NewBlockTemplate(chain, accountManager, uint64(time.Now().UnixNano()/1e6), time.Minute, time.Minute)
        }
 }