From b4d5ec900749ccd421dd49dad0e679e771913b1b Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Sun, 17 Mar 2019 01:34:42 +0800 Subject: core: fix headerchain coinbase validation Coinbase address is the owner address of the node. --- core/headerchain.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/headerchain.go b/core/headerchain.go index 946b96f18..61822210c 100644 --- a/core/headerchain.go +++ b/core/headerchain.go @@ -518,7 +518,13 @@ func (hc *HeaderChain) verifyDexonHeader(header *types.Header, header.Number.Uint64(), err) } - if header.Coinbase != common.BytesToAddress(coreBlock.ProposerID.Bytes()) { + gs := gov.GetStateForConfigAtRound(header.Round) + node, err := gs.GetNodeByID(coreBlock.ProposerID) + if err != nil { + return err + } + + if header.Coinbase != node.Owner { return fmt.Errorf("coinbase mismatch") } @@ -538,7 +544,6 @@ func (hc *HeaderChain) verifyDexonHeader(header *types.Header, return fmt.Errorf("round mismatch") } - gs := gov.GetStateForConfigAtRound(header.Round) config := gs.Configuration() if header.GasLimit != config.BlockGasLimit { return fmt.Errorf("block gas limit mismatch") -- cgit eebsd-ports-gnome' href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/'>freebsd-ports-gnome
FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
path: root/net/miniupnpd
Commit message (Expand)AuthorAgeFilesLines
* net/miniupnpd: properly link against ports OpenSSL/LibreSSLpgollucci2015-06-282-0/+14
* - Add CPE infoamdmi32015-04-251-0/+2
* Add missing USE_OPENSSL=yestijl2015-01-151-1/+2
* - Update to 1.9ak2014-11-072-3/+3
* net/miniupnpd: Upgrade version 1.8.20140523 => 1.8.20141022marino2014-11-053-54/+3
* net/miniupnpd: update to 1.8.20140523wg2014-06-218-5/+120
* s/-script://bapt2014-04-041-4/+4
* - Update to version 1.8.20140310 [1]pawel2014-03-152-8/+4
* net/miniupnpd: Bump PORTREVISIONmarino2014-01-261-0/+1
* net/miniupnpd: Fix PF rules issue, support stagemarino2014-01-261-10/+9
* Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1
* - update to 1.8jgh2013-02-084-71/+13
* Move the rc.d scripts of the form *.sh.in to *.indougb2012-08-062-1/+1
* - readd patch pf_enable_filter_rules.patch to fix PF_ENABLE_FILTER_RULESsperber2012-06-201-0/+11
* - update to 1.7sperber2012-06-025-43/+27
* - Update to version 1.6 [1]pawel2012-05-123-7/+17
* In the rc.d scripts, change assignments to rcvar to use thedougb2012-01-141-1/+1
* Restore PORTEPOCHerwin2011-04-201-0/+1
* - Update to 1.5dhn2011-03-252-4/+4
* - Get Rid MD5 supportmiwi2011-03-201-1/+0
* Update to latest version.jpaetzel2010-10-12