mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
XDCx, core/state: fix unnecessary conversion (unconvert) (#1507)
Co-authored-by: wit <wit765765346@gmail>
This commit is contained in:
parent
b3ae8beb91
commit
6b20f9ad88
3 changed files with 3 additions and 5 deletions
|
|
@ -170,7 +170,7 @@ func (o *OrderItem) SetBSON(raw bson.Raw) error {
|
|||
|
||||
if decoded.Signature != nil {
|
||||
o.Signature = &Signature{
|
||||
V: byte(decoded.Signature.V),
|
||||
V: decoded.Signature.V,
|
||||
R: common.HexToHash(decoded.Signature.R),
|
||||
S: common.HexToHash(decoded.Signature.S),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ func (l *LendingItem) SetBSON(raw bson.Raw) error {
|
|||
|
||||
if decoded.Signature != nil {
|
||||
l.Signature = &Signature{
|
||||
V: byte(decoded.Signature.V),
|
||||
V: decoded.Signature.V,
|
||||
R: common.HexToHash(decoded.Signature.R),
|
||||
S: common.HexToHash(decoded.Signature.S),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@ func BenchmarkCutOriginal(b *testing.B) {
|
|||
|
||||
func BenchmarkCutsetterFn(b *testing.B) {
|
||||
value := common.HexToHash("0x01")
|
||||
cutSetFn := func(r rune) bool {
|
||||
return int32(r) == int32(0)
|
||||
}
|
||||
cutSetFn := func(r rune) bool { return r == 0 }
|
||||
for i := 0; i < b.N; i++ {
|
||||
bytes.TrimLeftFunc(value[:], cutSetFn)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue