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:
moneromooo-monero 2018-10-24 18:24:11 +00:00
parent 769ae42a7b
commit 8d71b2b1b3
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
9 changed files with 125 additions and 65 deletions

View file

@ -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