-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CLI] Add support for running standard indexer processors to the local testnet #10254
[CLI] Add support for running standard indexer processors to the local testnet #10254
Conversation
5076245
to
cb317a0
Compare
5f28de8
to
9c50340
Compare
3b28941
to
f59af3e
Compare
9c50340
to
3e46168
Compare
3e46168
to
cea8653
Compare
fcb0465
to
fe141c9
Compare
9ec8ad5
to
eaa59f2
Compare
fe141c9
to
25fe203
Compare
eaa59f2
to
c984694
Compare
25fe203
to
ec1bb8f
Compare
dfc812a
to
48f2219
Compare
ec1bb8f
to
a20df49
Compare
48f2219
to
90c7967
Compare
a20df49
to
0166c9f
Compare
90c7967
to
4d7e72f
Compare
0166c9f
to
543cdac
Compare
4d7e72f
to
8e61ff4
Compare
543cdac
to
446a5fb
Compare
8e61ff4
to
abcebd8
Compare
446a5fb
to
57b3c28
Compare
169b0fb
to
0d385ad
Compare
57b3c28
to
126f8d8
Compare
0d385ad
to
4e0b6d2
Compare
126f8d8
to
7f3c143
Compare
4e0b6d2
to
20d4773
Compare
7f3c143
to
b8a554c
Compare
20d4773
to
0455b2f
Compare
b8a554c
to
c1a3508
Compare
0455b2f
to
981ae09
Compare
c1a3508
to
0c3cb4b
Compare
981ae09
to
ee9d4d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I will let Greg or Bowen to double check on indexer processor stuff.
#[clap( | ||
long, | ||
value_enum, | ||
default_values_t = vec![ | ||
ProcessorName::AccountTransactionsProcessor, | ||
ProcessorName::CoinProcessor, | ||
ProcessorName::DefaultProcessor, | ||
ProcessorName::EventsProcessor, | ||
ProcessorName::FungibleAssetProcessor, | ||
ProcessorName::StakeProcessor, | ||
ProcessorName::TokenProcessor, | ||
ProcessorName::TokenV2Processor, | ||
ProcessorName::UserTransactionProcessor, | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clap with default values - This is convenience! TIL
let processor_config = match processor_name { | ||
ProcessorName::AccountTransactionsProcessor => { | ||
ProcessorConfig::AccountTransactionsProcessor | ||
}, | ||
ProcessorName::AnsProcessor => { | ||
bail!("ANS processor is not supported in the local testnet") | ||
}, | ||
ProcessorName::CoinProcessor => ProcessorConfig::CoinProcessor, | ||
ProcessorName::DefaultProcessor => ProcessorConfig::DefaultProcessor, | ||
ProcessorName::EventsProcessor => ProcessorConfig::EventsProcessor, | ||
ProcessorName::FungibleAssetProcessor => ProcessorConfig::FungibleAssetProcessor, | ||
ProcessorName::NftMetadataProcessor => { | ||
bail!("NFT Metadata processor is not supported in the local testnet") | ||
}, | ||
ProcessorName::StakeProcessor => ProcessorConfig::StakeProcessor, | ||
ProcessorName::TokenProcessor => { | ||
ProcessorConfig::TokenProcessor(TokenProcessorConfig { | ||
// This NFT points thing doesn't exist on local testnets. | ||
nft_points_contract: None, | ||
}) | ||
}, | ||
ProcessorName::TokenV2Processor => ProcessorConfig::TokenV2Processor, | ||
ProcessorName::UserTransactionProcessor => ProcessorConfig::UserTransactionProcessor, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - Personally I would add the unsupported processor into a set, then check from the list/set.
Stack
Description
This PR adds support for running indexer processors to the local testnet. The processors you run is configurable with
--processors
, which uses the newProcessorName
enum.Note: I will update the dependency from that branch to a specific rev later.
Test Plan
I also tested that works when using
--with-host-postgres
: