diff --git a/XDCx/tradingstate/orderitem.go b/XDCx/tradingstate/orderitem.go index 4d1bb25a01..fb3c749db4 100644 --- a/XDCx/tradingstate/orderitem.go +++ b/XDCx/tradingstate/orderitem.go @@ -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), } diff --git a/XDCxlending/lendingstate/lendingitem.go b/XDCxlending/lendingstate/lendingitem.go index 4d8e074b48..c1dc624158 100644 --- a/XDCxlending/lendingstate/lendingitem.go +++ b/XDCxlending/lendingstate/lendingitem.go @@ -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), } diff --git a/core/state/state_object_test.go b/core/state/state_object_test.go index a5b28dec88..876d4f90d4 100644 --- a/core/state/state_object_test.go +++ b/core/state/state_object_test.go @@ -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) }