Fix txHash in solana with job (#1076)
* Remove filter solanas and aptos from method getVaasToMigrate * Fix origin tx in solana Add k8s service for tx-tracker --------- Co-authored-by: Agustin Pazos <agpazos85@gmail.com>
This commit is contained in:
parent
e63a7a12e4
commit
278cd50dcb
|
@ -1,3 +1,20 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .NAME }}
|
||||
namespace: {{ .NAMESPACE }}
|
||||
labels:
|
||||
app: {{ .NAME }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ .NAME }}
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8000
|
||||
name: {{ .NAME }}
|
||||
protocol: TCP
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
|
@ -262,3 +279,4 @@ spec:
|
|||
requests:
|
||||
memory: {{ .RESOURCES_REQUESTS_MEMORY }}
|
||||
cpu: {{ .RESOURCES_REQUESTS_CPU }}
|
||||
|
||||
|
|
|
@ -141,9 +141,8 @@ func (m *MigrateSourceChainTx) runComplexMigration(ctx context.Context) error {
|
|||
m.logger.Error("failed to process vaa", zap.Error(err), zap.String("id", v.ID))
|
||||
continue
|
||||
}
|
||||
time.Sleep(5 * time.Second)
|
||||
time.Sleep(100 * time.Microsecond)
|
||||
}
|
||||
page++
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -277,9 +276,6 @@ func (m *MigrateSourceChainTx) getVaasToMigrate(ctx context.Context, chainID sdk
|
|||
// add match step by chain
|
||||
var matchStage1 bson.D
|
||||
if chainID != sdk.ChainIDUnset {
|
||||
if chainID == sdk.ChainIDSolana || chainID == sdk.ChainIDAptos {
|
||||
return []VAASourceChain{}, errors.New("invalid chainID")
|
||||
}
|
||||
matchStage1 = bson.D{{Key: "$match", Value: bson.D{
|
||||
{Key: "emitterChain", Value: chainID},
|
||||
}}}
|
||||
|
|
|
@ -11,8 +11,9 @@ import (
|
|||
)
|
||||
|
||||
type solanaTransactionSignature struct {
|
||||
BlockTime int64 `json:"blockTime"`
|
||||
Signature string `json:"signature"`
|
||||
BlockTime int64 `json:"blockTime"`
|
||||
Signature string `json:"signature"`
|
||||
Err interface{} `json:"err"`
|
||||
}
|
||||
|
||||
type solanaGetTransactionResponse struct {
|
||||
|
@ -32,8 +33,7 @@ type solanaGetTransactionResponse struct {
|
|||
} `json:"parsed"`
|
||||
} `json:"instructions"`
|
||||
} `json:"innerInstructions"`
|
||||
|
||||
Err []interface{} `json:"err"`
|
||||
Err interface{} `json:"err"`
|
||||
} `json:"meta"`
|
||||
Transaction struct {
|
||||
Message struct {
|
||||
|
@ -98,7 +98,8 @@ func (a *apiSolana) fetchSolanaTx(
|
|||
nativeTxHash = sigs[0].Signature
|
||||
} else {
|
||||
for _, sig := range sigs {
|
||||
if a.timestamp != nil && sig.BlockTime == a.timestamp.Unix() {
|
||||
|
||||
if a.timestamp != nil && sig.BlockTime == a.timestamp.Unix() && sig.Err == nil {
|
||||
nativeTxHash = sig.Signature
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue