File tree 1 file changed +2
-4
lines changed
solana/programs/example-native-token-transfers/src/instructions
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -155,8 +155,6 @@ pub fn claim_ownership(ctx: Context<ClaimOwnership>) -> Result<()> {
155
155
}
156
156
157
157
// * Set peers
158
- // TODO: update peers? should that be a separate instruction? take timestamp
159
- // for modification? (for total ordering)
160
158
161
159
#[ derive( Accounts ) ]
162
160
#[ instruction( args: SetPeerArgs ) ]
@@ -172,7 +170,7 @@ pub struct SetPeer<'info> {
172
170
pub config : Account < ' info , Config > ,
173
171
174
172
#[ account(
175
- init ,
173
+ init_if_needed ,
176
174
space = 8 + NttManagerPeer :: INIT_SPACE ,
177
175
payer = payer,
178
176
seeds = [ NttManagerPeer :: SEED_PREFIX , args. chain_id. id. to_be_bytes( ) . as_ref( ) ] ,
@@ -181,7 +179,7 @@ pub struct SetPeer<'info> {
181
179
pub peer : Account < ' info , NttManagerPeer > ,
182
180
183
181
#[ account(
184
- init ,
182
+ init_if_needed ,
185
183
space = 8 + InboxRateLimit :: INIT_SPACE ,
186
184
payer = payer,
187
185
seeds = [
You can’t perform that action at this time.
0 commit comments