diff --git a/privval/signer_requestHandler.go b/privval/signer_requestHandler.go index a74e1b3fd0..61c9dc06df 100644 --- a/privval/signer_requestHandler.go +++ b/privval/signer_requestHandler.go @@ -46,10 +46,6 @@ func DefaultValidationRequestHandler( var proTxHash crypto.ProTxHash proTxHash, err = privVal.GetProTxHash(context.Background()) - if err != nil { - return res, err - } - if err != nil { res = mustWrapMsg(&privvalproto.ProTxHashResponse{ ProTxHash: nil, Error: &privvalproto.RemoteSignerError{Code: 0, Description: err.Error()}}) diff --git a/test/e2e/node/main.go b/test/e2e/node/main.go index caf90c2ac4..fc246e1286 100644 --- a/test/e2e/node/main.go +++ b/test/e2e/node/main.go @@ -407,7 +407,7 @@ func setupCoreServer(cfg *Config) (*mockcoreserver.JRPCServer, error) { srv = mockcoreserver.WithMethods( srv, mockcoreserver.WithQuorumInfoMethod(coreServer, mockcoreserver.Endless), - mockcoreserver.WithQuorumSignMethod(coreServer, mockcoreserver.Endless), + mockcoreserver.WithQuorumSignMethod(coreServer, mockcoreserver.Endless, coreServer.LLMQType), mockcoreserver.WithQuorumVerifyMethod(coreServer, mockcoreserver.Endless), mockcoreserver.WithMasternodeMethod(coreServer, mockcoreserver.Endless), mockcoreserver.WithGetNetworkInfoMethod(coreServer, mockcoreserver.Endless), diff --git a/test/e2e/pkg/mockcoreserver/methods.go b/test/e2e/pkg/mockcoreserver/methods.go index bd5431e61e..5894dfa867 100644 --- a/test/e2e/pkg/mockcoreserver/methods.go +++ b/test/e2e/pkg/mockcoreserver/methods.go @@ -33,18 +33,20 @@ func WithQuorumInfoMethod(cs CoreServer, times int) MethodFunc { } // WithQuorumSignMethod ... -func WithQuorumSignMethod(cs CoreServer, times int) MethodFunc { +func WithQuorumSignMethod(cs CoreServer, times int, quorumType btcjson.LLMQType) MethodFunc { call := OnMethod(func(ctx context.Context, req btcjson.Request) (interface{}, error) { cmd := btcjson.QuorumCmd{} - err := unmarshalCmd(req, &cmd.SubCmd, &cmd.LLMQType, &cmd.RequestID, &cmd.MessageHash, &cmd.QuorumHash, &cmd.Submit) + err := unmarshalCmd(req, &cmd.SubCmd, &cmd.RequestID, &cmd.MessageHash, &cmd.QuorumHash, &cmd.Submit) if err != nil { return nil, err } + cmd.LLMQType = &quorumType + return cs.QuorumSign(ctx, cmd), nil }) return func(srv *JRPCServer) { srv. - On("quorum sign"). + On("quorum platformsign"). Expect(And(Debug())). Times(times). Respond(call, JSONContentType()) @@ -100,7 +102,7 @@ func WithMasternodeMethod(cs CoreServer, times int) MethodFunc { // WithGetNetworkInfoMethod ... func WithGetNetworkInfoMethod(cs CoreServer, times int) MethodFunc { - call := OnMethod(func(ctx context.Context, req btcjson.Request) (interface{}, error) { + call := OnMethod(func(ctx context.Context, _req btcjson.Request) (interface{}, error) { cmd := btcjson.GetNetworkInfoCmd{} return cs.GetNetworkInfo(ctx, cmd), nil }) @@ -115,7 +117,7 @@ func WithGetNetworkInfoMethod(cs CoreServer, times int) MethodFunc { // WithPingMethod ... func WithPingMethod(cs CoreServer, times int) MethodFunc { - call := OnMethod(func(ctx context.Context, req btcjson.Request) (interface{}, error) { + call := OnMethod(func(ctx context.Context, _req btcjson.Request) (interface{}, error) { cmd := btcjson.PingCmd{} return cs.Ping(ctx, cmd), nil })