Skip to content

Commit

Permalink
add geyser_plugin_config support for anchor localnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommy Johnson committed Jul 14, 2022
1 parent ae0131d commit 85ae6cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -31,6 +31,7 @@ The minor version will be incremented upon a breaking change and the patch versi
* ts: verbose error for missing `ANCHOR_WALLET` variable when using `NodeWallet.local()` ([#1958](https://github.com/coral-xyz/anchor/pull/1958)).
* ts: Add `MethodsBuilder#accountsStrict` for strict typing on ix account input ([#2019](https://github.com/coral-xyz/anchor/pull/2019)).
* Update solana dependencies to 1.10.29 ([#2027](https://github.com/coral-xyz/anchor/pull/2027)).
* cli: Add `test.validator.geyser_plugin_config` support ([#2016](https://github.com/coral-xyz/anchor/pull/2016)).

### Fixes

Expand Down
8 changes: 8 additions & 0 deletions cli/src/config.rs
Expand Up @@ -857,6 +857,9 @@ pub struct _Validator {
// Warp the ledger to WARP_SLOT after starting the validator.
#[serde(skip_serializing_if = "Option::is_none")]
pub warp_slot: Option<String>,
// Load a geyser config file
#[serde(skip_serializing_if = "Option::is_none")]
pub geyser_plugin_config: Option<String>,
}

#[derive(Debug, Default, Clone, Serialize, Deserialize)]
Expand Down Expand Up @@ -886,6 +889,8 @@ pub struct Validator {
pub slots_per_epoch: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub warp_slot: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub geyser_plugin_config: Option<String>,
}

impl From<_Validator> for Validator {
Expand All @@ -911,6 +916,7 @@ impl From<_Validator> for Validator {
.unwrap_or(solana_sdk::rpc_port::DEFAULT_RPC_PORT),
slots_per_epoch: _validator.slots_per_epoch,
warp_slot: _validator.warp_slot,
geyser_plugin_config: _validator.geyser_plugin_config
}
}
}
Expand All @@ -932,6 +938,7 @@ impl From<Validator> for _Validator {
rpc_port: Some(validator.rpc_port),
slots_per_epoch: validator.slots_per_epoch,
warp_slot: validator.warp_slot,
geyser_plugin_config: validator.geyser_plugin_config
}
}
}
Expand Down Expand Up @@ -999,6 +1006,7 @@ impl Merge for _Validator {
.slots_per_epoch
.or_else(|| self.slots_per_epoch.take()),
warp_slot: other.warp_slot.or_else(|| self.warp_slot.take()),
geyser_plugin_config: other.geyser_plugin_config.or_else(|| self.geyser_plugin_config.take())
};
}
}
Expand Down

0 comments on commit 85ae6cb

Please sign in to comment.