use finalized blockhashes; remove saving old blockhashes

This commit is contained in:
tjs 2022-04-03 17:04:15 -04:00
parent 19da795035
commit 813cd3c1c9
2 changed files with 1 additions and 14 deletions

View File

@ -249,19 +249,6 @@ const useHydrateStore = () => {
actions.loadMarketFills()
}, 20 * SECONDS)
useInterval(() => {
const blockhashTimes = useMangoStore.getState().connection.blockhashTimes
const blockhashTimesCopy = [...blockhashTimes]
const mangoClient = useMangoStore.getState().connection.client
mangoClient.updateRecentBlockhash(blockhashTimesCopy).then(() => {
setMangoStore((state) => {
state.connection.client = mangoClient
state.connection.blockhashTimes = blockhashTimesCopy
})
})
}, 10 * SECONDS)
useEffect(() => {
actions.loadMarketFills()
}, [selectedMarket])

View File

@ -257,7 +257,7 @@ const useMangoStore = create<
txid: txid,
})
},
maxStoredBlockhashes: CLUSTER === 'devnet' ? 1 : 3,
blockhashCommitment: 'finalized',
})
return {
marketsInfo: [],