fix entry parse

This commit is contained in:
thloyi
2026-01-28 14:55:47 +08:00
parent dab77c0b61
commit c3536761af
7 changed files with 147 additions and 52 deletions

View File

@@ -68,13 +68,15 @@ var (
}
)
func ParseTransactionForSubscribe(ctx context.Context, update *SubscribeUpdateTransaction, loader *AddressTables, parsed chan<- TxSignal) {
func ParseTransactionForSubscribe(ctx context.Context, update *SubscribeUpdateTransaction, loader *AddressTables, parsed chan<- TxSignal, done chan<- struct{}) {
versioned, err := toVersionedTransaction(update)
if err != nil {
logger.Debug("txparser: failed to convert to versioned transaction", "error", err)
close(done)
return
}
go ParseTransaction(ctx, versioned, loader, parsed)
ParseTransaction(ctx, versioned, loader, parsed)
close(done)
}
var VoteProgram = solana.MustPublicKeyFromBase58("Vote111111111111111111111111111111111111111")
@@ -147,7 +149,7 @@ func ParseTransaction(ctx context.Context, versioned VersionedTransaction, loade
txRes, err := handler.Func(versioned, i)
if err != nil {
if !strings.HasPrefix(err.Error(), "account index") {
logger.Debug("txparser: failed to parse", "label", handler.Label, "instruction", err, "tx_hash", versioned.Signatures[0].String())
logger.Debug("txparser: failed to parse", "label", handler.Label, "err", err, "tx_hash", versioned.Signatures[0].String())
}
continue
}