Skip to content

Commit

Permalink
Fixed merge
Browse files Browse the repository at this point in the history
  • Loading branch information
gregzaitsev committed Jul 29, 2019
1 parent 2937578 commit 13f4bb3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 29 deletions.
5 changes: 2 additions & 3 deletions src/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,6 @@ int CPolkaApi::unsubscribeAccountNonce(string address) {
return PAPI_OK;
}

<<<<<<< HEAD
int CPolkaApi::subscribeFinalizedBlock(std::function<void(const BlockHeader &)> callback) {
_finalizedBlockSubscriber = callback;

Expand Down Expand Up @@ -1022,7 +1021,8 @@ int CPolkaApi::unsubscribeStorage(string key) {
_storageSubscriptionIds.erase(key);
}
return PAPI_OK;
=======
}

void CPolkaApi::submitAndSubcribeExtrinsic(uint8_t *encodedMethodBytes, unsigned int encodedMethodBytesSize,
string module, string method, string sender, string privateKey,
std::function<void(Json)> callback) {
Expand Down Expand Up @@ -1233,7 +1233,6 @@ Json CPolkaApi::submitExtrinsic(uint8_t *encodedMethodBytes, unsigned int encode
Json response = _jsonRpc->request(query);

return response;
>>>>>>> feature/dot-58
}

void CPolkaApi::signAndSendTransfer(string sender, string privateKey, string recipient, uint128 amount,
Expand Down
27 changes: 11 additions & 16 deletions src/interfaces/iapplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,6 @@ class IApplication {
virtual void signAndSendTransfer(string sender, string privateKey, string recipient, uint128 amount,
std::function<void(string)> callback) = 0;

/**
* Returns all pending extrinsics, potentially grouped by sender
*/
virtual Extrinsic *pendingExtrinsics() = 0;

/**
* Submit and subscribe a fully formatted extrinsic for block inclusion
*
Expand All @@ -305,17 +300,17 @@ class IApplication {
std::function<void(Json)> callback) = 0;

/**
* Submit a fully formatted extrinsic for block inclusion
*
*
* @param encodedMethodBytesSize - parametrs size in bytes
* @param module - invokable module name
* @param method - invokable module name
* @param sender - sender address
* @param privateKey - sender private key
*
* Returns node responce
*/
* Submit a fully formatted extrinsic for block inclusion
*
*
* @param encodedMethodBytesSize - parametrs size in bytes
* @param module - invokable module name
* @param method - invokable module name
* @param sender - sender address
* @param privateKey - sender private key
*
* Returns node responce
*/
virtual Json submitExtrinsic(uint8_t *encodedMethodBytes, unsigned int encodedMethodBytesSize, string module,
string method, string sender, string privateKey) = 0;

Expand Down
21 changes: 11 additions & 10 deletions test/get_pending_extrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
#include <cassert>

int main(int argc, char *argv[]) {
/*
auto app = polkadot::api::getInstance()->app();
app->connect();
auto app = polkadot::api::getInstance()->app();
app->connect();
auto pe = app->pendingExtrinsics();
auto pe = app->pendingExtrinsics();
// cout << "Storage key for prefix \"" << module << " " << variable << "\" for address " << address << " : "
// << actualKey << endl;
// cout << "Storage key for prefix \"" << module << " " << variable << "\" for address " << address << " : "
// << actualKey << endl;
// // Check
// assert(expectedKey == actualKey);
// cout << "Matches expected key" << endl;
// // Check
// assert(expectedKey == actualKey);
// cout << "Matches expected key" << endl;

app->disconnect();
app->disconnect();
*/
cout << "success" << endl;

return 0;
Expand Down

0 comments on commit 13f4bb3

Please sign in to comment.