@@ -271,7 +271,7 @@ UniValue gettxoutproof(const JSONRPCRequest& request)
271271 } else {
272272 // Loop through txids and try to find which block they're in. Exit loop once a block is found.
273273 for (const auto & tx : setTxids) {
274- const Coin& coin = AccessByTxid (* pcoinsTip, tx);
274+ const Coin& coin = AccessByTxid (pcoinsTip. get () , tx);
275275 if (!coin.IsSpent ()) {
276276 pblockindex = chainActive[coin.nHeight ];
277277 break ;
@@ -1753,7 +1753,7 @@ UniValue combinerawtransaction(const JSONRPCRequest& request)
17531753 {
17541754 LOCK (cs_main);
17551755 LOCK (mempool.cs );
1756- CCoinsViewCache & viewChain = * pcoinsTip;
1756+ CCoinsViewCache viewChain ( pcoinsTip. get ()) ;
17571757 CCoinsViewMemPool viewMempool (&viewChain, mempool);
17581758 view.SetBackend (viewMempool); // temporarily switch cache backend to db+mempool view
17591759
@@ -1874,7 +1874,7 @@ UniValue signrawtransaction(const JSONRPCRequest& request)
18741874 CCoinsViewCache view (&viewDummy);
18751875 {
18761876 LOCK (mempool.cs );
1877- CCoinsViewCache & viewChain = * pcoinsTip;
1877+ CCoinsViewCache viewChain ( pcoinsTip. get ()) ;
18781878 CCoinsViewMemPool viewMempool (&viewChain, mempool);
18791879 view.SetBackend (viewMempool); // temporarily switch cache backend to db+mempool view
18801880
@@ -2083,7 +2083,7 @@ UniValue sendrawtransaction(const JSONRPCRequest& request)
20832083 if (!request.params [1 ].isNull () && request.params [1 ].get_bool ())
20842084 nMaxRawTxFee = 0 ;
20852085
2086- CCoinsViewCache & view = * pcoinsTip;
2086+ CCoinsViewCache view ( pcoinsTip. get ()) ;
20872087 bool fHaveChain = false ;
20882088 for (size_t o = 0 ; !fHaveChain && o < tx->vout .size (); o++) {
20892089 const Coin& existingCoin = view.AccessCoin (COutPoint (hashTx, o));
0 commit comments