Browse Source

node/accountant: fix linter warnings

tbjump 2 năm trước cách đây
mục cha
commit
e420d26356

+ 1 - 1
node/pkg/accountant/accountant_test.go

@@ -132,7 +132,7 @@ func newAccountantForTest(
 }
 
 // Converts a string into a go-ethereum Hash object used as test input.
-func hashFromString(str string) ethCommon.Hash {
+func hashFromString(str string) ethCommon.Hash { //nolint:unparam
 	if (len(str) > 2) && (str[0] == '0') && (str[1] == 'x') {
 		str = str[2:]
 	}

+ 1 - 1
node/pkg/accountant/submit_obs.go

@@ -408,7 +408,7 @@ func GetObservationResponses(txResp *sdktx.BroadcastTxResponse) (map[string]Obse
 	}
 
 	var msg sdktypes.TxMsgData
-	if err := msg.Unmarshal([]byte(data)); err != nil {
+	if err := msg.Unmarshal(data); err != nil {
 		return nil, fmt.Errorf("failed to unmarshal data: %w", err)
 	}