Added npl fields to the contract input. (#7)

* Added npl fields to the contract input.
* Made parameter passing optimisations.
This commit is contained in:
Ravin Perera
2019-10-07 10:59:34 +05:30
committed by GitHub
parent d1d59ddf63
commit 22a140c543
6 changed files with 81 additions and 26 deletions

View File

@@ -131,12 +131,11 @@ int read_contract_user_outputs()
if (bytes_available > 0)
{
unsigned char data[bytes_available];
char data[bytes_available];
read(fdout, data, bytes_available);
//Replace the existing user buffer with new buffer
vector<unsigned char> buffer(data, data + bytes_available);
user.outbuffer.swap(buffer);
//Populate the user output buffer with new data
shared::replace_string_contents(user.outbuffer, data, bytes_available);
cout << "Read " + to_string(bytes_available) << " bytes into user output buffer. user:" + user.pubkeyb64 << endl;
}