Fix race condition where p2p is faster than ETH

This commit is contained in:
Leo 2020-08-20 22:24:33 +02:00
parent ec6e261c43
commit b6b2d21bde
1 changed files with 45 additions and 42 deletions

View File

@ -222,6 +222,8 @@ func ethLockupProcessor(lockC chan *common.ChainLock, setC chan *common.Guardian
agg[i] = ok
}
if state.lockupSignatures[hash].ourVAA != nil {
// We have seen it on chain!
// Deep copy the VAA and add signatures
v := state.lockupSignatures[hash].ourVAA
signed := &vaa.VAA{
@ -273,4 +275,5 @@ func ethLockupProcessor(lockC chan *common.ChainLock, setC chan *common.Guardian
}
}
}
}
}