diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-16 19:26:29 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:50 +0800 |
commit | 2045312bf4b05539691a154b6d74a9d794e31add (patch) | |
tree | 9a089f2fc67a3317d8220b40464b4f08a7129632 /core | |
parent | 06fd0255cd83497c43b6c25aff3be470d0a3c91a (diff) | |
download | dexon-2045312bf4b05539691a154b6d74a9d794e31add.tar dexon-2045312bf4b05539691a154b6d74a9d794e31add.tar.gz dexon-2045312bf4b05539691a154b6d74a9d794e31add.tar.bz2 dexon-2045312bf4b05539691a154b6d74a9d794e31add.tar.lz dexon-2045312bf4b05539691a154b6d74a9d794e31add.tar.xz dexon-2045312bf4b05539691a154b6d74a9d794e31add.tar.zst dexon-2045312bf4b05539691a154b6d74a9d794e31add.zip |
dex/core: misc bug fixes
Diffstat (limited to 'core')
-rw-r--r-- | core/types/block.go | 3 | ||||
-rw-r--r-- | core/vm/governance.go | 2 |
2 files changed, 3 insertions, 2 deletions
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) |