iota.lib.cpp icon indicating copy to clipboard operation
iota.lib.cpp copied to clipboard

attachToTangle produces inconsistent bundles when using local POW

Open kuhlmannmarkus opened this issue 6 years ago • 0 comments

Bug description

attachToTangle produces inconsistent bundles when using local POW. With remote POW, it works.

Hardware Spec

Linux OBSCUREDMACHINENAME 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Steps To Reproduce

  1. Have a payload (_PL) built by entangled/mam/v1. (This is my use case)
  2. Send the payload as:
IOTA::API::Extended api(m_node, m_port, true, m_timeout);
IOTA::Models::Transfer transfer = {m_address, 0, _PL, m_tag};
std::vector<IOTA::Models::Transfer> transfers;
transfers.push_back(transfer);
auto res = api.sendTransfer(m_seed, 5, 14, transfers);

Expected behaviour

The constructed bundle should be valid.

Actual behavior

The first transaction in the bundle (for bundles consisting of 2 TXs) should reference the last transaction in the bundle as trunk. This is accomplished in the code by referencing tx.getHash(). The result of tx.getHash() is never part of the bundle, so the bundle itself gets inconsistent.

Logs or screenshots

See this bundle for example: CQGBQTSGRILTEIGNCBSZI9ZTZJXPBFQKUYFASFGJYOTONG9DKGHPKCOVXHJCIKLTHKXCEBQIOJYQZRX9X

kuhlmannmarkus avatar Feb 17 '19 09:02 kuhlmannmarkus