<commit_before>// Copyright (c) 2010 <NAME>
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include "chainparams.h"
#include "db.h"
#include "init.h"
#include "bitcoinrpc.h"

using namespace json_spirit;
using namespace std;

// Key used by getwork/getblocktemplate miners.
// Allocated in InitRPCMining, free'd in ShutdownRPCMining
static std::vector<unsigned char> salt;

void InitRPCMining()
{
    // getwork/getblocktemplate mining rewards paid here:
    salt.resize(4);
    RAND_bytes(salt.data(), sizeof(salt));
}

void ShutdownRPCMining()
{
}

Value getgenerate(const Array& params, bool fHelp)
{<commit_msg>fix memory size bug<commit_after>// Copyright (c) 2010 <NAME>
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include "chainparams.h"
#include "db.h"
#include "init.h"
#include "bitcoinrpc.h"

using namespace json_spirit;
using namespace std;

// Key used by getwork/getblocktemplate miners.
// Allocated in InitRPCMining, free'd in ShutdownRPCMining
static std::vector<unsigned char> salt;

void InitRPCMining()
{
    // getwork/getblocktemplate mining rewards paid here:
    salt.resize(4);
    RAND_bytes(salt.data(), 4);
}

void ShutdownRPCMining()
{
}

Value getgenerate(const Array& params, bool fHelp)
{
{'fraction_non_alphanumeric': 0.1184990125082291, 'fraction_numerical': 0.02040816326530612, 'mean_word_length': 4.62962962962963, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5958493', 'n_tokens_mistral': 516, 'n_tokens_neox': 477, 'n_words': 145}