func recalculateMsgBlockMerkleRootsSize(msgBlock *wire.MsgBlock) {
	tempBlock := hcashutil.NewBlock(msgBlock)
	merkles := blockchain.BuildMerkleTreeStore(tempBlock.Transactions(), false)
	merklesStake := blockchain.BuildMerkleTreeStore(tempBlock.STransactions(), false)
	msgBlock.Header.MerkleRoot = *merkles[len(merkles)-1]
	msgBlock.Header.StakeRoot = *merklesStake[len(merklesStake)-1]
	msgBlock.Header.Size = uint32(msgBlock.SerializeSize())
}
recalculateMsgBlockMerkleRootsSize recalculates the merkle roots for a msgBlock,
then stores them in the msgBlock's header. It also updates the block size.
package blockchain_test
import (
	"bytes"
	"compress/bzip2"
	"encoding/gob"
	"encoding/hex"
	"math"
	"math/big"
	"os"
	"path/filepath"
	"testing"
	"time"
	"github.com/HcashOrg/hcashd/blockchain"
	"github.com/HcashOrg/hcashd/chaincfg"
	"github.com/HcashOrg/hcashd/chaincfg/chainhash"
	"github.com/HcashOrg/hcashd/database"
	"github.com/HcashOrg/hcashd/txscript"
	"github.com/HcashOrg/hcashd/wire"
	"github.com/HcashOrg/hcashutil"
)