Open smoelius opened 4 years ago
The panic occurs in ClarityDatabase::insert_metadata here: https://github.com/trailofbits/x-audit-blockstack-core/blob/e2d3d5bae539d242851620e28129af6c4a9de642/src/vm/database/clarity_db.rs#L191 The following test case witnesses the panic:
ClarityDatabase::insert_metadata
#[test] fn double_define() { let program = " (define-data-var cursor int 0) (define-data-var cursor int 0) "; println!("{:?}", execute(&program)); }
Recommend that ClarityDatabase::insert_metadata return an error instead.
The panic occurs in
ClarityDatabase::insert_metadata
here: https://github.com/trailofbits/x-audit-blockstack-core/blob/e2d3d5bae539d242851620e28129af6c4a9de642/src/vm/database/clarity_db.rs#L191 The following test case witnesses the panic:Recommend that
ClarityDatabase::insert_metadata
return an error instead.