Skip to content

Commit ba7f937

Browse files
committed
debug: Add more debug logs and fix
Signed-off-by: gsstoykov <[email protected]>
1 parent a6b9deb commit ba7f937

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/sdk/main/src/Client.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ void Client::updateAddressBook()
691691
// as execute() will call other Client methods that also need the mutex
692692
const NodeAddressBook addressBook = AddressBookQuery().setFileId(FileId::ADDRESS_BOOK).execute(*this);
693693

694+
std::cout << "Node addresses in AB: " << std::endl;
694695
for (const auto& nodeAddress : addressBook.getNodeAddresses())
695696
{
696697
std::cout << "Node address: " << nodeAddress.toString() << std::endl;

src/sdk/tests/integration/NodeUpdateTransactionIntegrationTests.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,21 +376,17 @@ TEST_F(NodeUpdateTransactionIntegrationTests, CanChangeNodeAccountUpdateAddressb
376376
ASSERT_NO_THROW(updateResponse.getReceipt(client));
377377

378378
// Wait for mirror node to import data
379-
std::this_thread::sleep_for(std::chrono::seconds(5));
379+
std::this_thread::sleep_for(std::chrono::seconds(10));
380380

381381
// Submit to the updated node - should retry
382382
std::shared_ptr<PrivateKey> anotherKey = ED25519PrivateKey::generatePrivateKey();
383-
std::vector<AccountId> nodeAccountIds = { originalNodeAccountId, AccountId(4ULL) };
383+
std::vector<AccountId> nodeAccountIds = {AccountId(4ULL) };
384384
TransactionResponse testResponse = AccountCreateTransaction()
385385
.setKey(anotherKey->getPublicKey())
386386
.setNodeAccountIds(nodeAccountIds)
387387
.execute(client);
388388
ASSERT_NO_THROW(testResponse.getReceipt(client));
389389

390-
// Verify address book has been updated
391-
// Note: C++ SDK may not have direct access to internal network state like Go SDK
392-
// This verification might need to be adapted based on actual C++ SDK API
393-
394390
// This transaction should succeed
395391
TransactionResponse finalResponse = AccountCreateTransaction()
396392
.setKey(anotherKey->getPublicKey())

0 commit comments

Comments
 (0)