Populate memo in bigtable transaction structs (#19512)
* Populate memo in bigtable transaction structs * Preface memos with len
This commit is contained in:
@@ -12,9 +12,10 @@ use {
|
||||
},
|
||||
solana_storage_proto::convert::{generated, tx_by_addr},
|
||||
solana_transaction_status::{
|
||||
ConfirmedBlock, ConfirmedTransaction, ConfirmedTransactionStatusWithSignature, Reward,
|
||||
TransactionByAddrInfo, TransactionConfirmationStatus, TransactionStatus,
|
||||
TransactionStatusMeta, TransactionWithStatusMeta,
|
||||
extract_and_fmt_memos, ConfirmedBlock, ConfirmedTransaction,
|
||||
ConfirmedTransactionStatusWithSignature, Reward, TransactionByAddrInfo,
|
||||
TransactionConfirmationStatus, TransactionStatus, TransactionStatusMeta,
|
||||
TransactionWithStatusMeta,
|
||||
},
|
||||
std::{collections::HashMap, convert::TryInto},
|
||||
thiserror::Error,
|
||||
@@ -559,6 +560,7 @@ impl LedgerStorage {
|
||||
let err = meta.as_ref().and_then(|meta| meta.status.clone().err());
|
||||
let index = index as u32;
|
||||
let signature = transaction.signatures[0];
|
||||
let memo = extract_and_fmt_memos(&transaction.message);
|
||||
|
||||
for address in &transaction.message.account_keys {
|
||||
if !is_sysvar_id(address) {
|
||||
@@ -569,7 +571,7 @@ impl LedgerStorage {
|
||||
signature,
|
||||
err: err.clone(),
|
||||
index,
|
||||
memo: None, // TODO
|
||||
memo: memo.clone(),
|
||||
block_time: confirmed_block.block_time,
|
||||
});
|
||||
}
|
||||
@@ -581,7 +583,7 @@ impl LedgerStorage {
|
||||
slot,
|
||||
index,
|
||||
err,
|
||||
memo: None, // TODO
|
||||
memo,
|
||||
},
|
||||
));
|
||||
}
|
||||
|
Reference in New Issue
Block a user