File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -2519,4 +2519,16 @@ mod tests {
25192519 assert_eq ! ( tx. discount_weight( ) , 2034 ) ;
25202520 assert_eq ! ( tx. discount_vsize( ) , 509 ) ;
25212521 }
2522+
2523+ #[ test]
2524+ fn elip203 ( ) {
2525+ // Check that rust-elements can deserialize tests vector from ELIP203
2526+ // from
2527+ // https://github.com/ElementsProject/ELIPs/blob/main/elip-0203.mediawiki
2528+ let tx3: Transaction = hex_deserialize ! ( include_str!( "../tests/data/elip203_3.hex" ) ) ;
2529+ let tx4: Transaction = hex_deserialize ! ( include_str!( "../tests/data/elip203_4.hex" ) ) ;
2530+ let max_money = 21_000_000_000_000_00 ;
2531+ assert ! ( tx3. input[ 0 ] . asset_issuance. amount. explicit( ) . unwrap( ) > max_money) ;
2532+ assert ! ( tx4. input[ 0 ] . asset_issuance. inflation_keys. explicit( ) . unwrap( ) > max_money) ;
2533+ }
25222534}
You can’t perform that action at this time.
0 commit comments