diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-16 19:26:29 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | 88b272df86618979916a2b9f45723745dd556245 (patch) | |
tree | 7e33b4753e3920e65361991d695aeb1cadba92d1 /core | |
parent | 0c555d3f347dc8458ddae614b093c9b11d54e629 (diff) | |
download | dexon-88b272df86618979916a2b9f45723745dd556245.tar dexon-88b272df86618979916a2b9f45723745dd556245.tar.gz dexon-88b272df86618979916a2b9f45723745dd556245.tar.bz2 dexon-88b272df86618979916a2b9f45723745dd556245.tar.lz dexon-88b272df86618979916a2b9f45723745dd556245.tar.xz dexon-88b272df86618979916a2b9f45723745dd556245.tar.zst dexon-88b272df86618979916a2b9f45723745dd556245.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 1d403d972..3d0997f5e 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -300,7 +300,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) |