Enable VAA submission to Solana

This commit is contained in:
Leo 2020-08-21 00:06:38 +02:00
parent c381ed2459
commit 9bb44eb0f5
3 changed files with 7 additions and 7 deletions

View File

@ -247,7 +247,7 @@ func ethLockupProcessor(lockC chan *common.ChainLock, setC chan *common.Guardian
)
if *unsafeDevMode && len(sigs) >= quorum {
_, err := devnet.GetDevnetIndex()
idx, err := devnet.GetDevnetIndex()
if err != nil {
return err
}
@ -263,9 +263,9 @@ func ethLockupProcessor(lockC chan *common.ChainLock, setC chan *common.Guardian
zap.Binary("bytes", vaaBytes))
// TODO: actually submit to Solana once the agent works and has a reasonable key
//if idx == 0 {
// vaaC <- state.lockupSignatures[hash].ourVAA
//}
if idx == 0 {
vaaC <- state.lockupSignatures[hash].ourVAA
}
} else if !*unsafeDevMode {
panic("not implemented") // TODO
} else {

View File

@ -93,8 +93,8 @@ func (e *SolanaBridgeWatcher) Run(ctx context.Context) error {
timeout, _ := context.WithTimeout(ctx, 15*time.Second)
res, err := c.SubmitVAA(timeout, &agentv1.SubmitVAARequest{Vaa: vaaBytes})
if err != nil {
errC <- fmt.Errorf("failed to submit VAA: %w", err)
return
logger.Error("failed to submit VAA", zap.Error(err))
break
}
logger.Info("submitted VAA",

View File

@ -42,7 +42,7 @@ spec:
- -ethRPC
- ws://eth-devnet:8545
- -agentRPC
- http://localhost:9000
- localhost:9000
- -ethConfirmations
- '1'
- -unsafeDevMode