File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
libindy/src/services/pool Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -791,6 +791,10 @@ impl PoolService {
791791
792792 pub fn register_sp_parser ( txn_type : & str ,
793793 parser : CustomTransactionParser , free : CustomFree ) -> Result < ( ) , PoolError > {
794+ if transaction_handler:: REQUESTS_FOR_STATE_PROOFS . contains ( & txn_type) {
795+ return Err ( PoolError :: CommonError ( CommonError :: InvalidStructure (
796+ format ! ( "Try to override StateProof parser for default TXN_TYPE {}" , txn_type) ) ) ) ;
797+ }
794798 REGISTERED_SP_PARSERS . lock ( )
795799 . map ( |mut map| {
796800 map. insert ( txn_type. to_owned ( ) , ( parser, free) ) ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ use services::ledger::merkletree::merkletree::MerkleTree;
3232use services:: pool:: PoolService ;
3333use self :: indy_crypto:: bls:: Generator ;
3434
35- const REQUESTS_FOR_STATE_PROOFS : [ & ' static str ; 7 ] = [
35+ pub const REQUESTS_FOR_STATE_PROOFS : [ & ' static str ; 7 ] = [
3636 constants:: GET_NYM ,
3737 constants:: GET_SCHEMA ,
3838 constants:: GET_CRED_DEF ,
You can’t perform that action at this time.
0 commit comments