From 2045312bf4b05539691a154b6d74a9d794e31add Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Tue, 16 Oct 2018 19:26:29 +0800 Subject: dex/core: misc bug fixes --- core/types/block.go | 3 ++- core/vm/governance.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/types/block.go b/core/types/block.go index f3d49327f..b568c2b37 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -297,7 +297,8 @@ func (b *Block) ReceiptHash() common.Hash { return b.header.ReceiptHash } func (b *Block) UncleHash() common.Hash { return b.header.UncleHash } func (b *Block) Extra() []byte { return common.CopyBytes(b.header.Extra) } -func (b *Block) Header() *Header { return CopyHeader(b.header) } +func (b *Block) Header() *Header { return CopyHeader(b.header) } +func (b *Block) RawHeader() *Header { return b.header } // Body returns the non-header content of the block. func (b *Block) Body() *Body { return &Body{b.transactions, b.uncles} } diff --git a/core/vm/governance.go b/core/vm/governance.go index c9ab74bd7..9b4e2dde6 100644 --- a/core/vm/governance.go +++ b/core/vm/governance.go @@ -1540,7 +1540,7 @@ func (g *GovernanceContract) proposeCRS(signedCRS []byte) ([]byte, error) { dkgComplaints = append(dkgComplaints, x) } - threshold := int(g.state.DKGSetSize().Uint64() / 3 + 1) + threshold := int(g.state.DKGSetSize().Uint64()/3 + 1) dkgGPK, err := core.NewDKGGroupPublicKey( round.Uint64(), dkgMasterPKs, dkgComplaints, threshold) -- cgit v1.2.3