@@ -552,7 +552,7 @@ impl TopLevelState {
552552 ctrace ! ( STATE , "shard created({}, {:?})" , shard_id, shard_root) ;
553553
554554 self . set_shard_root ( shard_id, & BLAKE_NULL_RLP , & shard_root) ?;
555- self . set_shard_owner ( shard_id, & Address :: zero ( ) , * fee_payer) ?;
555+ self . set_shard_owner ( shard_id, & Address :: default ( ) , * fee_payer) ?;
556556 Ok ( ( ) )
557557 }
558558
@@ -628,7 +628,7 @@ impl TopLevelState {
628628 }
629629
630630 fn require_shard < ' a > ( & ' a self , shard_id : ShardId ) -> TrieResult < RefMut < ' a , Shard > > {
631- let default = || Shard :: new ( BLAKE_NULL_RLP , Address :: zero ( ) ) ;
631+ let default = || Shard :: new ( BLAKE_NULL_RLP , Address :: default ( ) ) ;
632632 let db = TrieFactory :: readonly ( self . db . as_hashdb ( ) , & self . root ) ?;
633633 let shard_address = ShardAddress :: new ( shard_id) ;
634634 let from_db = || self . db . get_cached_shard ( & shard_address) ;
@@ -822,7 +822,7 @@ mod tests_state {
822822
823823 #[ test]
824824 fn should_work_when_cloned ( ) {
825- let a = Address :: zero ( ) ;
825+ let a = Address :: default ( ) ;
826826
827827 let mut state = {
828828 let mut state = get_temp_state ( ) ;
@@ -855,7 +855,7 @@ mod tests_state {
855855
856856 #[ test]
857857 fn get_from_database ( ) {
858- let a = Address :: zero ( ) ;
858+ let a = Address :: default ( ) ;
859859 let ( root, db) = {
860860 let mut state = get_temp_state ( ) ;
861861 assert_eq ! ( Ok ( ( ) ) , state. inc_nonce( & a) ) ;
@@ -872,7 +872,7 @@ mod tests_state {
872872
873873 #[ test]
874874 fn remove ( ) {
875- let a = Address :: zero ( ) ;
875+ let a = Address :: default ( ) ;
876876 let mut state = get_temp_state ( ) ;
877877 assert_eq ! ( Ok ( false ) , state. account_exists( & a) ) ;
878878 assert_eq ! ( Ok ( false ) , state. account_exists_and_not_null( & a) ) ;
@@ -888,7 +888,7 @@ mod tests_state {
888888
889889 #[ test]
890890 fn empty_account_is_not_created ( ) {
891- let a = Address :: zero ( ) ;
891+ let a = Address :: default ( ) ;
892892 let db = get_temp_state_db ( ) ;
893893 let ( root, db) = {
894894 let mut state = TopLevelState :: new ( db) ;
@@ -903,7 +903,7 @@ mod tests_state {
903903
904904 #[ test]
905905 fn remove_from_database ( ) {
906- let a = Address :: zero ( ) ;
906+ let a = Address :: default ( ) ;
907907 let ( root, db) = {
908908 let mut state = get_temp_state ( ) ;
909909 assert_eq ! ( Ok ( ( ) ) , state. inc_nonce( & a) ) ;
@@ -932,7 +932,7 @@ mod tests_state {
932932 #[ test]
933933 fn alter_balance ( ) {
934934 let mut state = get_temp_state ( ) ;
935- let a = Address :: zero ( ) ;
935+ let a = Address :: default ( ) ;
936936 let b = 1u64 . into ( ) ;
937937 assert_eq ! ( Ok ( ( ) ) , state. add_balance( & a, & U256 :: from( 69u64 ) ) ) ;
938938 assert_eq ! ( Ok ( 69 . into( ) ) , state. balance( & a) ) ;
@@ -953,7 +953,7 @@ mod tests_state {
953953 #[ test]
954954 fn alter_nonce ( ) {
955955 let mut state = get_temp_state ( ) ;
956- let a = Address :: zero ( ) ;
956+ let a = Address :: default ( ) ;
957957 assert_eq ! ( Ok ( ( ) ) , state. inc_nonce( & a) ) ;
958958 assert_eq ! ( Ok ( 1 . into( ) ) , state. nonce( & a) ) ;
959959 assert_eq ! ( Ok ( ( ) ) , state. inc_nonce( & a) ) ;
@@ -969,7 +969,7 @@ mod tests_state {
969969 #[ test]
970970 fn balance_nonce ( ) {
971971 let mut state = get_temp_state ( ) ;
972- let a = Address :: zero ( ) ;
972+ let a = Address :: default ( ) ;
973973 assert_eq ! ( Ok ( 0 . into( ) ) , state. balance( & a) ) ;
974974 assert_eq ! ( Ok ( 0 . into( ) ) , state. nonce( & a) ) ;
975975 assert_eq ! ( Ok ( ( ) ) , state. commit( ) ) ;
@@ -980,7 +980,7 @@ mod tests_state {
980980 #[ test]
981981 fn ensure_cached ( ) {
982982 let mut state = get_temp_state ( ) ;
983- let a = Address :: zero ( ) ;
983+ let a = Address :: default ( ) ;
984984 state. require_account ( & a) . unwrap ( ) ;
985985 assert_eq ! ( Ok ( ( ) ) , state. commit( ) ) ;
986986 assert_eq ! ( * state. root( ) , "db4046bb91a12a37cbfb0f09631aad96a97248423163eca791e19b430cc7fe4a" . into( ) ) ;
@@ -989,7 +989,7 @@ mod tests_state {
989989 #[ test]
990990 fn checkpoint_basic ( ) {
991991 let mut state = get_temp_state ( ) ;
992- let a = Address :: zero ( ) ;
992+ let a = Address :: default ( ) ;
993993 state. create_checkpoint ( 0 ) ;
994994 assert_eq ! ( Ok ( ( ) ) , state. add_balance( & a, & U256 :: from( 69u64 ) ) ) ;
995995 assert_eq ! ( Ok ( 69 . into( ) ) , state. balance( & a) ) ;
@@ -1005,7 +1005,7 @@ mod tests_state {
10051005 #[ test]
10061006 fn checkpoint_nested ( ) {
10071007 let mut state = get_temp_state ( ) ;
1008- let a = Address :: zero ( ) ;
1008+ let a = Address :: default ( ) ;
10091009 state. create_checkpoint ( 0 ) ;
10101010 assert_eq ! ( Ok ( ( ) ) , state. add_balance( & a, & U256 :: from( 69u64 ) ) ) ;
10111011 state. create_checkpoint ( 1 ) ;
@@ -1020,7 +1020,7 @@ mod tests_state {
10201020 #[ test]
10211021 fn checkpoint_discard ( ) {
10221022 let mut state = get_temp_state ( ) ;
1023- let a = Address :: zero ( ) ;
1023+ let a = Address :: default ( ) ;
10241024 state. create_checkpoint ( 0 ) ;
10251025 assert_eq ! ( Ok ( ( ) ) , state. add_balance( & a, & U256 :: from( 69u64 ) ) ) ;
10261026 state. create_checkpoint ( 1 ) ;
0 commit comments