From 1fc5596d190989fc89d4abcc1d6f6eb551c2ce5b Mon Sep 17 00:00:00 2001 From: Max Sanchez Date: Tue, 10 Dec 2024 09:24:43 -0500 Subject: [PATCH] Max of 3 BTC headers per block from Sequencer Fixed witness contract address --- core/blockchain.go | 4 ++-- core/vm/contracts.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index ddf3211b43..881ab886a3 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1773,8 +1773,8 @@ func (bc *BlockChain) GetBitcoinAttributesForNextBlock(timestamp uint64) (*types // if len(headersToAdd) > types.MaximumBtcHeadersInTx { // headersToAdd = headersToAdd[0:types.MaximumBtcHeadersInTx] // } - if len(headersToAdd) > 6 { - headersToAdd = headersToAdd[0:6] + if len(headersToAdd) > 3 { + headersToAdd = headersToAdd[0:3] } log.Info(fmt.Sprintf("Headers to add while generating Bitcoin Attributes Deposited transaction: %d", headersToAdd)) diff --git a/core/vm/contracts.go b/core/vm/contracts.go index ba8b9c75b5..b8670f140a 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -821,7 +821,7 @@ var hvmContractsToAddress = map[reflect.Type][]byte{ reflect.TypeOf(&btcAddrToScript{}): {0x46}, reflect.TypeOf(&btcInputByTxid{}): {0x47}, reflect.TypeOf(&btcOutputByTxid{}): {0x48}, - reflect.TypeOf(&btcTxGetInputWitness{}): {0x48}, + reflect.TypeOf(&btcTxGetInputWitness{}): {0x49}, } var PrecompiledContractsHvm0 = map[common.Address]PrecompiledContract{