From 1e3c41511d4a7504662388611119612fbc5fd8c1 Mon Sep 17 00:00:00 2001 From: Jon Pollock Date: Mon, 1 Apr 2024 14:36:58 -0700 Subject: [PATCH] Use MaxTxnSizeBytesPoS for atomic transaction construction. --- routes/atomic_txns.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/atomic_txns.go b/routes/atomic_txns.go index ead49b31..535bad76 100644 --- a/routes/atomic_txns.go +++ b/routes/atomic_txns.go @@ -76,7 +76,7 @@ func (fes *APIServer) CreateAtomicTxnsWrapper(ww http.ResponseWriter, req *http. // Validate that: // (1) The resulting transaction is not over the size limit of an atomic transaction. // (2) The resulting wrapper transactions have sufficient fees to cover the wrapper. - if txnSizeBytes > utxoView.Params.MaxBlockSizeBytes/2 { + if txnSizeBytes > utxoView.GlobalParamsEntry.MaxTxnSizeBytesPoS { _AddBadRequestError(ww, fmt.Sprint("CreateAtomicTxnsWrapper: Resulting wrapper transaction too large")) return }