Skip to content

Commit

Permalink
feat(bpos): change MinGasPrice from Fixed64 to uint64
Browse files Browse the repository at this point in the history
  • Loading branch information
RainFallsSilent committed Aug 18, 2023
1 parent 568ef32 commit 5cf6cc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/types/payload/crcproposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ type ChangeSideChainMinGasPriceInfo struct {
GenesisBlockHash common.Uint256

// The min gas price of ESC side chain
MinGasPrice common.Fixed64
MinGasPrice uint64

// Effective at the side chain height of ESC.
EffectiveHeight uint32
Expand All @@ -413,7 +413,7 @@ func (sc *ChangeSideChainMinGasPriceInfo) Serialize(w io.Writer) error {
return errors.New("failed to serialize GenesisBlockHash")
}

if err := sc.MinGasPrice.Serialize(w); err != nil {
if err := common.WriteUint64(w, sc.MinGasPrice); err != nil {
return errors.New("failed to serialize MinGasPrice")
}

Expand All @@ -430,7 +430,7 @@ func (sc *ChangeSideChainMinGasPriceInfo) Deserialize(r io.Reader) error {
return errors.New("failed to deserialize GenesisBlockHash")
}

if err = sc.MinGasPrice.Deserialize(r); err != nil {
if sc.MinGasPrice, err = common.ReadUint64(r); err != nil {
return errors.New("failed to deserialize MinGasPrice")
}

Expand Down

0 comments on commit 5cf6cc0

Please sign in to comment.