• تاریخ انتشار : دوشنبه ۲۲ بهمن ۱۴۰۳ - ۲۲:۴۴
  • کد خبر : 1283
  • چاپ خبر

Solana: Doubts about getTransactionCount, not working as intended

Here is the basis of your invitation: Title: Solon: Somennia Powers GettransctionCount, without work, how most Edit Solana – a popular blockchain of the platform, its own quick and unidentified transaction. The production of the program, which is combined with the Solana network, is important for how to work with different features. In this state,

Here is the basis of your invitation:

Title: Solon: Somennia Powers GettransctionCount, without work, how most

Edit

Solana – a popular blockchain of the platform, its own quick and unidentified transaction. The production of the program, which is combined with the Solana network, is important for how to work with different features. In this state, we spread two important features in the solana: “GettransctionCount” and its use of CSlotsubscribe ". We also have a little samurreration we shook with, we take out these features.

Nominating for Corne nomination

To make a number of root slots in Solana, you can use theSlotsubscribefeature presented by Solana SDK. That

Rust

Use Solana-Program :: {

Account_info :: {next_accoun_info, Accountinfo},

Vricho,

Intrypoint :: Programresult,

Program_error :: Printerror,

Pubkey :: Pubky,

};

Entrance! (Program);

FN Main () -> Programresult {

/ /

Let (slot_number, _) = Next_account_info (& Accountinfo :: new_indexed ());

Println! ("Slot slot slot for horns: {}", slot_number);

Good (())

}

In this primer we sign the “slot” of the finished slot (1). As for the Slot

1, we will meet with the information of the entrepreneur. Let Ulbe what to use “GettransctionCount”.

Using GettransactCount

The GettransctionCount Function at Solana Retinds Commonwealth, finishing transaction for the giving block. To use this feature, you need to get Endx on the block and call GettransctionCount. Here is a primer:

`Rust

Use soolana_program :: {{

Account_info :: {next_accoun_info, Accountinfo},

Vricho,

Intrypoint :: Programresult,

Program_error :: Printerror,

Pubkey :: Pubky,

};

Entrance! (Program);

FN Main () -> Programresult {

// Repeat the block of the block (1 in this case)

Let block_index = Next_account_info (& Accountinfo :: New_indexed ()). Pubkey;

// Call GettransctionCount with Index Block

Let Transaction_Count = Solana_program :: Get_transction_Count (Block_index);

Println! ("Records: {}", transaction_count);

Good (())

}

In this primer we refer to OB information on the slot slot (2). We call Zatem GettransctionCount with the block of the block. This feature returns the values ​​of U128, which is represented by the common transaction.

Somenia

Solana: Doubts about getTransactionCount, not working as intended

Then, as we paid these functions in our claims, we shook with some somns:

  • GettransctionCount vs. Getlottransiactions

    : We use “GettransctionCount”, but we do not accept any resolutions because there is no transaction in Solana. For example, Slotsubscribeis maintained for working with the "slot" that starts when the new slot or the basics are covered.

  • Block index : block index, returnedNext_account_info, does not always meet the slot. We need to useblock_index` as it is to get a right cutter.

3

Conclusion

In this condition, we studied two important features in Solana: “GettransctionCount” and its use of Slotsubscribe. We have a sample of some with which we have sought these features and brought out preferences about Prodigo, how to use it properly. Ponima Basic Programming Solana and these features, you will be on the way to creating a DICE program that is united with the Solana network.

ORDER FLOW DECENTRALISED TAKE

لینک کوتاه

برچسب ها

ناموجود
ارسال نظر شما
مجموع نظرات : 0 در انتظار بررسی : 0 انتشار یافته : 0
  • نظرات ارسال شده توسط شما، پس از تایید توسط مدیران سایت منتشر خواهد شد.
  • نظراتی که حاوی تهمت یا افترا باشد منتشر نخواهد شد.
  • نظراتی که به غیر از زبان فارسی یا غیر مرتبط با خبر باشد منتشر نخواهد شد.