Save raw inputs alongside the ledger (#167)

* Saving raw inputs in the ledger.
* Store full history in separate folder.

* Moved full history fb structs to a seperate fbs file

* Removed raw_inputs from the proposal

* Fixed code comments

* Saving raw user input string

* Code refactoring

* Resolved PR comments
This commit is contained in:
Chalith Desaman
2020-11-30 15:42:20 +05:30
committed by GitHub
parent e90e9bb5dd
commit 2f5d95ae7a
17 changed files with 410 additions and 144 deletions

View File

@@ -7,25 +7,36 @@
namespace usr
{
/**
/**
* Represents a signed contract input message a network user has submitted.
*/
struct user_input
{
const std::string input_container;
const std::string sig;
const util::PROTOCOL protocol; // The encoding protocol used for the input container.
user_input(const std::string input_container, const std::string sig, const util::PROTOCOL protocol)
: input_container(std::move(input_container)), sig(std::move(sig)), protocol(protocol)
struct user_input
{
}
const std::string input_container;
const std::string sig;
const util::PROTOCOL protocol; // The encoding protocol used for the input container.
user_input(std::string_view input_container, std::string_view sig, const util::PROTOCOL protocol)
: input_container(input_container), sig(sig), protocol(protocol)
user_input(const std::string input_container, const std::string sig, const util::PROTOCOL protocol)
: input_container(std::move(input_container)), sig(std::move(sig)), protocol(protocol)
{
}
user_input(std::string_view input_container, std::string_view sig, const util::PROTOCOL protocol)
: input_container(input_container), sig(sig), protocol(protocol)
{
}
};
struct raw_user_input
{
}
};
const std::string pubkey;
const std::string input;
raw_user_input(std::string_view pubkey, std::string_view input)
: pubkey(pubkey), input(input)
{
}
};
} // namespace usr