nip60: Processed is also a function now.

This commit is contained in:
fiatjaf
2025-01-30 16:07:20 -03:00
parent b86d5d52bb
commit 14c4101a03
3 changed files with 26 additions and 40 deletions

View File

@@ -151,19 +151,8 @@ func TestWalletRoundtrip(t *testing.T) {
// load wallets from events
walletStash := loadStash(ctx, kr, eventChan, make(chan struct{}))
var errorChanErr error
go func() {
for {
errorChanErr = <-walletStash.Processed
if errorChanErr != nil {
return
}
}
}()
<-done
time.Sleep(time.Millisecond * 200)
require.NoError(t, errorChanErr, "errorChan shouldn't have received any errors: %w", errorChanErr)
// compare loaded wallets with original ones
loadedWallet1 := walletStash.wallets[wallet1.Identifier]