@@ -91,33 +91,15 @@ namespace fc::cli::_node {
91
91
fmt::print (" {}\n " , encodeToString (address));
92
92
} else {
93
93
auto maybe_actor = api._ ->StateGetActor (
94
- address, TipsetKey{}); // TODO this place input on console log of
94
+ address, TipsetKey{});
95
95
96
96
Actor actor;
97
97
if (maybe_actor.has_error ()) {
98
- TipsetCPtr chain_head =
99
- cliTry (api._ ->ChainHead (), " Getting chain head..." );
100
- CID state_root = chain_head->getParentStateRoot ();
101
- /*
102
- auto network_version =
103
- cliTry(api._->StateNetworkVersion(chain_head->key), "Getting network
104
- version..."); // TODO tipsetkey? auto ipfs =
105
- std::make_shared<ApiIpfsDatastore>(api._); ipfs->actor_version =
106
- actorVersion(network_version);
107
- */
108
- auto ipfs = std::make_shared<ApiIpfsDatastore>(api._ );
109
- StateTreeImpl tree{ipfs, state_root};
110
- auto actor_exist = tree.tryGet (address);
111
-
112
- if (not actor_exist.has_value ()) {
113
98
table_writer.write (
114
99
{{" Address" , encodeToString (address)},
115
100
{" Error" , " Error get actor" }});
116
101
continue ;
117
- }
118
- actor = maybe_actor.value ();
119
102
120
- actor.balance = 0 ;
121
103
} else {
122
104
actor = maybe_actor.value ();
123
105
}
@@ -301,7 +283,7 @@ namespace fc::cli::_node {
301
283
CLI_RUN () {
302
284
const Node::Api api{argm};
303
285
const Address signing_address{cliArgv<Address>(argv, 0 , " Signing address" )};
304
- const std::string hex_message{cliArgv<std::string>(argv, 0 , " Hex message" )};
286
+ const std::string hex_message{cliArgv<std::string>(argv, 1 , " Hex message" )};
305
287
306
288
const Bytes decode_message =
307
289
cliTry (unhex (hex_message), " Decoding hex message..." );
@@ -381,6 +363,9 @@ namespace fc::cli::_node {
381
363
382
364
const auto cid_signed_message = cliTry (api._ ->MarketAddBalance (address_from, address, amt),
383
365
" Add balance..." );
366
+ const MsgWait message_wait =
367
+ cliTry (api._ ->StateWaitMsg (cid_signed_message.value (), 1 , 10 , false ),
368
+ " Wait message" );
384
369
385
370
fmt::print (" Add balance message cid : {}\n " , cid_signed_message.value ());
386
371
}
0 commit comments