Skip to content

Commit

Permalink
change encoding and key to match xdpos
Browse files Browse the repository at this point in the history
  • Loading branch information
wanwiset25 committed May 9, 2024
1 parent 096125b commit 6713629
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions consensus/XDPoS/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package XDPoS

import (
"encoding/hex"
"encoding/base64"
"math/big"

"github.com/XinFinOrg/XDC-Subnet/common"
Expand All @@ -42,7 +42,7 @@ type V2BlockInfo struct {
Committed bool
Miner common.Hash
Timestamp *big.Int
HexRLP string
EncodedRLP string
Error string
}

Expand Down Expand Up @@ -215,7 +215,7 @@ func (api *API) GetV2BlockByHeader(header *types.Header, uncle bool) *V2BlockInf
Committed: committed,
Miner: header.Coinbase.Hash(),
Timestamp: header.Time,
HexRLP: hex.EncodeToString(encodeBytes),
EncodedRLP: base64.StdEncoding.EncodeToString(encodeBytes),
}
return block
}
Expand Down

0 comments on commit 6713629

Please sign in to comment.