Skip to content

Running into panic when choose 0 sats to go to myself in zombie channel recovery #158

@Liongrass

Description

@Liongrass

I'm using chantools to conduct a zombie channel recovery. I am making an offer:

chantools zombierecovery makeoffer --node1_keys preparedkeys-2024-08-25-xxx.json --node2_keys preparedkeys-2024-08-26-xxx.json --feerate 4

I input my keys and am asked "How many sats should go to you (bc1pxxxxx) before fees?:"

I enter 0 and get the following panic:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x47169a]

goroutine 1 [running]:
main.(*zombieRecoveryMakeOfferCommand).Execute(0xc0000bb280, 0x12?, {0xc000291820?, 0x127ce00?, 0xc00001bac0?})
	/home/ubuntu/git/chantools/cmd/chantools/zombierecovery_makeoffer.go:327 +0x1c6f
github.com/spf13/cobra.(*Command).execute(0xc0001c0588, {0xc0002ea900, 0x6, 0x6})
	/home/ubuntu/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:852 +0x69d
github.com/spf13/cobra.(*Command).ExecuteC(0x262f300)
	/home/ubuntu/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x389
github.com/spf13/cobra.(*Command).Execute(...)
	/home/ubuntu/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897
main.main()
	/home/ubuntu/git/chantools/cmd/chantools/root.go:138 +0x55e

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions