From a9c25fe55df249c16ec375f5f099c18db281510b Mon Sep 17 00:00:00 2001 From: Aryaman Jain Date: Wed, 15 May 2024 17:20:39 +0000 Subject: [PATCH] build --- src/flamenco/txn/Local.mk | 7 +++---- src/flamenco/txn/fd_txn_generate.c | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/flamenco/txn/Local.mk b/src/flamenco/txn/Local.mk index 83264329c9..e91f704c4e 100644 --- a/src/flamenco/txn/Local.mk +++ b/src/flamenco/txn/Local.mk @@ -1,5 +1,4 @@ +ifdef FD_HAS_INT128 $(call add-hdrs,fd_txn_generate.h) -$(call add-objs,fd_txn_generate,fd_txn_generate) -.PHONY: fd_txn_generate - -fd_txn_generate: $(OBJDIR)/bin/fd_txn_generate +$(call add-objs,fd_txn_generate,fd_flamenco) +endif diff --git a/src/flamenco/txn/fd_txn_generate.c b/src/flamenco/txn/fd_txn_generate.c index e835e78f10..39816e51c0 100644 --- a/src/flamenco/txn/fd_txn_generate.c +++ b/src/flamenco/txn/fd_txn_generate.c @@ -69,7 +69,7 @@ fd_txn_base_generate( uchar out_txn_meta[ static FD_TXN_MAX_SZ ], fd_memcpy( write_ptr, accounts->signers_r, FD_TXN_ACCT_ADDR_SZ * accounts->readonly_signed_cnt ); write_ptr += FD_TXN_ACCT_ADDR_SZ * accounts->readonly_signed_cnt; - ulong non_signers_write_sz = FD_TXN_ACCT_ADDR_SZ * (accounts->acct_cnt - accounts->readonly_unsigned_cnt - accounts->signature_cnt); + ulong non_signers_write_sz = FD_TXN_ACCT_ADDR_SZ * (ulong)(accounts->acct_cnt - accounts->readonly_unsigned_cnt - accounts->signature_cnt); fd_memcpy( write_ptr, accounts->non_signers_w, non_signers_write_sz); write_ptr += non_signers_write_sz; @@ -126,7 +126,7 @@ fd_txn_add_instr( uchar * txn_meta_ptr, fd_memcpy( write_ptr, accounts, accounts_sz ); write_ptr += accounts_sz; - ushort data_sz = instr_buf_sz; + ushort data_sz = (ushort)instr_buf_sz; uint compact_data_len_sz = fd_cu16_enc( data_sz, write_ptr ); write_ptr += compact_data_len_sz;