aboutsummaryrefslogtreecommitdiffstats
path: root/dex/app.go
diff options
context:
space:
mode:
Diffstat (limited to 'dex/app.go')
-rw-r--r--dex/app.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/dex/app.go b/dex/app.go
index 6ef20684f..e7fdbb4fe 100644
--- a/dex/app.go
+++ b/dex/app.go
@@ -488,10 +488,19 @@ func (d *DexconApp) BlockDelivered(
panic(err)
}
+ var owner common.Address
+ if !block.IsEmpty() {
+ gs := d.gov.GetStateForConfigAtRound(block.Position.Round)
+ owner, err = gs.GetNodeOwnerByID(block.ProposerID)
+ if err != nil {
+ panic(err)
+ }
+ }
+
newBlock := types.NewBlock(&types.Header{
Number: new(big.Int).SetUint64(result.Height),
Time: big.NewInt(result.Timestamp.UnixNano() / 1000000),
- Coinbase: common.BytesToAddress(block.ProposerID.Bytes()),
+ Coinbase: owner,
GasLimit: d.gov.DexconConfiguration(block.Position.Round).BlockGasLimit,
Difficulty: big.NewInt(1),
Round: block.Position.Round,