Skip to content

Commit

Permalink
Update asserter.go
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaying-peng committed Apr 10, 2024
1 parent dbbe1ec commit 5c678e1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions asserter/asserter.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ func NewGenericAsserter(
errors []*types.Error,
genesisBlockIdentifier *types.BlockIdentifier,
timestampStartIndex int64,
validationFilePath string,
) (*Asserter, error) {
if err := OperationTypes(supportedOperationTypes); err != nil {
return nil, fmt.Errorf("operation types %v are invalid: %w", supportedOperationTypes, err)
Expand All @@ -144,13 +145,16 @@ func NewGenericAsserter(
)
}

validationConfig, err := getValidationConfig(validationFilePath)
if err != nil {
return nil, fmt.Errorf("config %s is invalid: %w", validationFilePath, err)
}

asserter := &Asserter{
operationTypes: supportedOperationTypes,
historicalBalanceLookup: historicalBalanceLookup,
supportedNetworks: supportedNetworks,
validations: &Validations{
Enabled: false,
},
validations: validationConfig,
genesisBlock: genesisBlockIdentifier,
timestampStartIndex: timestampStartIndex,
}
Expand Down

0 comments on commit 5c678e1

Please sign in to comment.