Allow Solana VAAs to be posted even if the message account does not exist

This is needed for hand-crafted governance VAAs that originate from Solana

Change-Id: I50f75de9a83dd9640d960a7808c0a6605afc539d
This commit is contained in:
Hendrik Hofstadt 2021-08-06 10:40:37 +02:00
parent 05aece1f7c
commit 86cd27c919
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ pub fn post_vaa(ctx: &ExecutionContext, accs: &mut PostVAA, vaa: PostVAAData) ->
}
// If the VAA originates from another chain we need to create the account and populate all fields
if vaa.emitter_chain != CHAIN_ID_SOLANA {
if !accs.message.is_initialized() {
accs.message.nonce = vaa.nonce;
accs.message.emitter_chain = vaa.emitter_chain;
accs.message.emitter_address = vaa.emitter_address;