mirror of
https://github.com/monero-project/monero.git
synced 2025-08-11 18:00:19 -04: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
|
@ -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