mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
wallet2: only export necessary outputs and key images
and disable annoying test that requires ridiculous amounts of skullduggery every time some format changes
This commit is contained in:
parent
769ae42a7b
commit
8d71b2b1b3
9 changed files with 125 additions and 65 deletions
Binary file not shown.
|
@ -77,7 +77,7 @@ int ColdOutputsFuzzer::run(const std::string &filename)
|
|||
s = std::string("\x01\x16serialization::archive") + s;
|
||||
try
|
||||
{
|
||||
std::vector<tools::wallet2::transfer_details> outputs;
|
||||
std::pair<size_t, std::vector<tools::wallet2::transfer_details>> outputs;
|
||||
std::stringstream iss;
|
||||
iss << s;
|
||||
boost::archive::portable_binary_iarchive ar(iss);
|
||||
|
|
|
@ -908,9 +908,21 @@ TEST(Serialization, portability_outputs)
|
|||
ASSERT_TRUE(td2.m_pk_index == 0);
|
||||
}
|
||||
|
||||
struct unsigned_tx_set
|
||||
{
|
||||
std::vector<tools::wallet2::tx_construction_data> txes;
|
||||
tools::wallet2::transfer_container transfers;
|
||||
};
|
||||
template <class Archive>
|
||||
inline void serialize(Archive &a, unsigned_tx_set &x, const boost::serialization::version_type ver)
|
||||
{
|
||||
a & x.txes;
|
||||
a & x.transfers;
|
||||
}
|
||||
#define UNSIGNED_TX_PREFIX "Monero unsigned tx set\003"
|
||||
TEST(Serialization, portability_unsigned_tx)
|
||||
{
|
||||
|
||||
const boost::filesystem::path filename = unit_test::data_dir / "unsigned_monero_tx";
|
||||
std::string s;
|
||||
const cryptonote::network_type nettype = cryptonote::TESTNET;
|
||||
|
@ -918,7 +930,7 @@ TEST(Serialization, portability_unsigned_tx)
|
|||
ASSERT_TRUE(r);
|
||||
const size_t magiclen = strlen(UNSIGNED_TX_PREFIX);
|
||||
ASSERT_FALSE(strncmp(s.c_str(), UNSIGNED_TX_PREFIX, magiclen));
|
||||
tools::wallet2::unsigned_tx_set exported_txs;
|
||||
unsigned_tx_set exported_txs;
|
||||
s = s.substr(magiclen);
|
||||
r = false;
|
||||
try
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue