blockchain-core icon indicating copy to clipboard operation
blockchain-core copied to clipboard

Finer-grained validation PR 1 of 4: break-up interface into stages

Open xandkar opened this issue 2 years ago • 2 comments

with currently no-op implementations.

  • step 2 of 4: inserts possibly-redundant (with is_valid) implementations of is_well_formed: https://github.com/helium/blockchain-core/pull/1242 ;
  • step 3 of 4: inserts possibly-redundant (with is_valid) implementations of is_prompt: https://github.com/helium/blockchain-core/pull/1262 ;
  • step 4 of 4: removes some redundancy shared in implementations of: is_valid, is_well_formed and is_prompt.

xandkar avatar Feb 08 '22 20:02 xandkar

=== === Reason: no match of right hand side value 
                 {error,
                     {blockchain_txn_transfer_hotspot_v1,error,
                         {undef,
                             [{blockchain_txn_transfer_hotspot_v1,is_prompt,
                                  [],[]},

Vagabond avatar Mar 04 '22 17:03 Vagabond

=== === Reason: {assertMatch,
                  [{module,blockchain_price_oracle_SUITE},
                   {line,1303},
                   {expression,
                    "blockchain_txn : is_valid ( SignedPayerAddGatewayTx02 , Chain )"},
                   {pattern,"{ error , payer_invalid_staking_key }"},
                   {value,
                    {error,
                     {blockchain_txn_add_gateway_v1,error,
                      {undef,
                       [{blockchain_txn_add_gateway_v1,is_prompt,[],[]},
                        {blockchain_txn,is_valid,2,

Vagabond avatar Mar 04 '22 17:03 Vagabond