Skip to content

Commit 7632745

Browse files
authored
Merge pull request #437 from blinklabs-io/fix/txsubmission-init-callback
fix: check for empty config in txsubmission init callback
2 parents 27a6da4 + b4bf502 commit 7632745

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

protocol/txsubmission/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func (s *Server) handleDone() error {
135135
}
136136

137137
func (s *Server) handleInit() error {
138-
if s.config.InitFunc == nil {
138+
if s.config == nil || s.config.InitFunc == nil {
139139
return fmt.Errorf(
140140
"received tx-submission Init message but no callback function is defined",
141141
)

0 commit comments

Comments
 (0)