vulpemventures / ocean

:ocean: Elements/Liquid wallet daemon
MIT License
5 stars 7 forks source link

panic after adding transaction #74

Open tiero opened 5 months ago

tiero commented 5 months ago

I am running testnet and with badger db

time="2024-01-28T20:32:55Z" level=debug msg="transaction service: utxo(s) will be eventually unlocked in ~10 seconds"
time="2024-01-28T20:32:55Z" level=debug msg="gRPC method: /ocean.v1.TransactionService/BroadcastTransaction"
time="2024-01-28T20:32:55Z" level=debug msg="account service: added 1 utxo(s) for account bip84-account0"
time="2024-01-28T20:32:55Z" level=debug msg="utxo repository: publish event UtxoAdded"
time="2024-01-28T20:32:56Z" level=debug msg="account service: received new tx 08ee8530a59a94750bc85be8e306c4b88cac89c2b6f058df65b354aa6e176ee0 from channel"
time="2024-01-28T20:32:56Z" level=debug msg="account service: added new transaction 08ee8530a59a94750bc85be8e306c4b88cac89c2b6f058df65b354aa6e176ee0 for account(s) bip84-account0"
time="2024-01-28T20:32:56Z" level=debug msg="transaction repository: publish event TransactionAdded"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8a2b84]
goroutine 579160 [running]:
github.com/vulpemventures/ocean/internal/infrastructure/blockchain-scanner/electrum.(*service).dbEventHandler(0x4015e10d80, {0x1, {{0x401c0ae8c0, 0x40}, 0x0}, {0x40213e9560, 0xe}, {0x401f2e8980, 0x40}})
        /home/runner/work/ocean/ocean/internal/infrastructure/blockchain-scanner/electrum/service.go:499 +0xe94
created by github.com/vulpemventures/ocean/internal/infrastructure/blockchain-scanner/electrum.(*db).listen in goroutine 117
        /home/runner/work/ocean/ocean/internal/infrastructure/blockchain-scanner/electrum/db.go:96 +0x13c
tiero commented 5 months ago

It happens after I re-watch a external script when it confirms apparently

time="2024-01-28T21:17:00Z" level=debug msg="gRPC method: /ocean.v1.TransactionService/BroadcastTransaction"
time="2024-01-28T21:17:00Z" level=debug msg="account service: added 3 utxo(s) for account bip84-account0"
time="2024-01-28T21:17:00Z" level=debug msg="utxo repository: publish event UtxoAdded"
time="2024-01-28T21:17:01Z" level=debug msg="gRPC method: /ocean.v1.NotificationService/WatchExternalScript"
time="2024-01-28T21:17:01Z" level=debug msg="account service: received new tx 5b763b1146e386e3cab1d24d7551b329da676fb12ae8fdb7b05361595bcc526b from channel"
time="2024-01-28T21:17:01Z" level=debug msg="account service: added new transaction 5b763b1146e386e3cab1d24d7551b329da676fb12ae8fdb7b05361595bcc526b for account(s) bip84-account0"
time="2024-01-28T21:17:01Z" level=debug msg="transaction repository: publish event TransactionAdded"
time="2024-01-28T21:17:02Z" level=debug msg="gRPC method: /ocean.v1.NotificationService/WatchExternalScript"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8a2b84]
goroutine 113224 [running]:
github.com/vulpemventures/ocean/internal/infrastructure/blockchain-scanner/electrum.(*service).dbEventHandler(0x4015e4a4e0, {0x1, {{0x4019609680, 0x40}, 0x0}, {0x4023906630, 0xe}, {0x4019259040, 0x40}})
        /home/runner/work/ocean/ocean/internal/infrastructure/blockchain-scanner/electrum/service.go:499 +0xe94
created by github.com/vulpemventures/ocean/internal/infrastructure/blockchain-scanner/electrum.(*db).listen in goroutine 107
        /home/runner/work/ocean/ocean/internal/infrastructure/blockchain-scanner/electrum/db.go:96 +0x13c