Skip to content

Commit

Permalink
Merge pull request #170 from XinFinOrg/encodedrlp
Browse files Browse the repository at this point in the history
change encoding and key to match xdpos
  • Loading branch information
wanwiset25 authored May 16, 2024
2 parents cdee4bc + 6713629 commit 76a21d1
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 @@ -43,7 +43,7 @@ type V2BlockInfo struct {
Committed bool
Miner common.Hash
Timestamp *big.Int
HexRLP string
EncodedRLP string
Error string
}

Expand Down Expand Up @@ -217,7 +217,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 76a21d1

Please sign in to comment.