ignore unknonw meta

This commit is contained in:
thloyi
2026-05-18 11:46:49 +08:00
parent 39bfeb085f
commit 9454c3f6c7
2 changed files with 5 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ func main() {
// laserstream-mainnet-slc.helius-rpc.com:80 // laserstream-mainnet-slc.helius-rpc.com:80
ch := make(chan example.SubscriptionMessage, 1) ch := make(chan example.SubscriptionMessage, 1)
go example.RunLoopWithReConnect(context.Background(), "", "", parser.SolProgramPump, ch) go example.RunLoopWithReConnect(context.Background(), "ams.rpc.orbitflare.com:10000", "ORBIT-EPUZGQ-177605-508881", parser.SolProgramPump, ch)
// var tokenTxs = make(map[string]*types.Tx) // var tokenTxs = make(map[string]*types.Tx)
// currentBlock := uint64(0) // currentBlock := uint64(0)
for msg := range ch { for msg := range ch {

View File

@@ -3,6 +3,7 @@ package pump_parser
import ( import (
"encoding/base64" "encoding/base64"
"encoding/json" "encoding/json"
"errors"
"fmt" "fmt"
"strconv" "strconv"
"strings" "strings"
@@ -876,6 +877,9 @@ func ConvertYellowstoneGrpcTransactionToSolanaTransaction(y *pb.SubscribeUpdateT
//Version: nil, //Version: nil,
} }
meta := y.Transaction.GetMeta() meta := y.Transaction.GetMeta()
if meta == nil {
return nil, errors.New("meta can not parser")
}
yTx := y.Transaction.Transaction yTx := y.Transaction.Transaction
if meta.Err != nil && len(meta.Err.GetErr()) > 0 { if meta.Err != nil && len(meta.Err.GetErr()) > 0 {