Electroneum
Loading...
Searching...
No Matches
WalletSubaddress Class Reference
Inheritance diagram for WalletSubaddress:
Collaboration diagram for WalletSubaddress:

Protected Member Functions

virtual void SetUp ()
virtual void TearDown ()
Protected Member Functions inherited from testing::Test
 Test ()
 Test ()

Protected Attributes

tools::wallet2 w1
const std::string password = "testpass"
crypto::secret_key recovery_key = crypto::secret_key()
const std::string test_label = "subaddress test label"
uint32_t major_index = 0
uint32_t minor_index = 0
const cryptonote::subaddress_index subaddress_index = {major_index, minor_index}

Additional Inherited Members

Public Types inherited from testing::Test
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
Public Member Functions inherited from testing::Test
virtual ~Test ()
virtual ~Test ()
Static Public Member Functions inherited from testing::Test
static void SetUpTestCase ()
static void TearDownTestCase ()
static bool HasFatalFailure ()
static bool HasNonfatalFailure ()
static bool HasFailure ()
static void RecordProperty (const std::string &key, const std::string &value)
static void RecordProperty (const std::string &key, int value)
static void SetUpTestCase ()
static void TearDownTestCase ()
static bool HasFatalFailure ()
static bool HasNonfatalFailure ()
static bool HasFailure ()
static void RecordProperty (const std::string &key, const std::string &value)
static void RecordProperty (const std::string &key, int value)

Detailed Description

Definition at line 40 of file subaddress.cpp.

Member Function Documentation

◆ SetUp()

virtual void WalletSubaddress::SetUp ( )
inlineprotectedvirtual

Reimplemented from testing::Test.

Definition at line 43 of file subaddress.cpp.

44 {
45 try
46 {
47 w1.generate("", password, recovery_key, true, false);
48 }
49 catch (const std::exception& e)
50 {
51 LOG_ERROR("failed to generate wallet: " << e.what());
52 throw;
53 }
54
55 w1.add_subaddress_account(test_label);
56 w1.set_subaddress_label(subaddress_index, test_label);
57 }
const std::string test_label
const cryptonote::subaddress_index subaddress_index
const std::string password
crypto::secret_key recovery_key
tools::wallet2 w1
#define LOG_ERROR(x)
Definition misc_log_ex.h:98

◆ TearDown()

virtual void WalletSubaddress::TearDown ( )
inlineprotectedvirtual

Reimplemented from testing::Test.

Definition at line 59 of file subaddress.cpp.

60 {
61 }

Member Data Documentation

◆ major_index

uint32_t WalletSubaddress::major_index = 0
protected

Definition at line 68 of file subaddress.cpp.

◆ minor_index

uint32_t WalletSubaddress::minor_index = 0
protected

Definition at line 69 of file subaddress.cpp.

◆ password

const std::string WalletSubaddress::password = "testpass"
protected

Definition at line 64 of file subaddress.cpp.

◆ recovery_key

crypto::secret_key WalletSubaddress::recovery_key = crypto::secret_key()
protected

Definition at line 65 of file subaddress.cpp.

◆ subaddress_index

const cryptonote::subaddress_index WalletSubaddress::subaddress_index = {major_index, minor_index}
protected

Definition at line 70 of file subaddress.cpp.

◆ test_label

const std::string WalletSubaddress::test_label = "subaddress test label"
protected

Definition at line 66 of file subaddress.cpp.

◆ w1

tools::wallet2 WalletSubaddress::w1
protected

Definition at line 63 of file subaddress.cpp.


The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/tests/unit_tests/subaddress.cpp