Block Generation Inquiries

Hello.

My name is Luffy, who is working and studying in graduate school.
I’m looking at the ‘java-algorand-sdk-develop’ source code in the IntelliJ environment.
No matter how much you check, you cannot know when a block is created after a transaction is created, submitted, and approved.
Can you tell me where the api where the Algorand block is created??

Help me please.
Thank you.

Hi @Luffy it is faster to poll the node or indexer once each 2 seconds.

The node has a “wait-for-block” endpoint too.

See v2 - Algorand Developer Portal

@mxmauro @aojjazz

Thank you both very much for your replies.
Upon checking, it seems that what you two said is the part that waits for the block to be created after broadcasting the transaction.
As in the Quick Start example at GitHub - algorand/java-algorand-sdk: Algorand SDK for Java7+ to interact with the Algorand network to create a transaction like this:

// Create a payment transaction
Transaction tx1 = Transaction.PaymentTransactionBuilder()
.lookupParams(algod) // lookup fee, firstValid, lastValid
.sender(accounts.get(0))
.receiver(accounts.get(1))
.amount(1000000)
.noteUTF8(“test transaction!”)
.build();

Is it correct that the part where the block is directly created in the same way cannot be checked through the sdk?
I want to know if my understanding is correct.
Thank you again.

Take a look at Your First Transaction - Algorand Developer Portal and the ‘your first transaction’ example code.