<commit_before>//
//  CBConstants.h
//  cbitcoin
//
//  Created by <NAME> on 28/04/2012.
//  Copyright (c) 2012 <NAME>
//  
//  This file is part of cbitcoin.
//
//  cbitcoin is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//  
//  cbitcoin is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//  
//  You should have received a copy of the GNU General Public License
//  along with cbitcoin.  If not, see <http://www.gnu.org/licenses/>.

#ifndef CBCONSTANTSH
#define CBCONSTANTSH

//  Macros

#define CB_MESSAGE_MAX_SIZE 0x02000000 // 32 MB
#define CB_BLOCK_ALLOWED_TIME_DRIFT 7200 // 2 Hours from network time
#define CB_NETWORK_TIME_ALLOWED_TIME_DRIFT 4200 // 70 minutes from system time
#define CB_MIN_PROTO_VERSION 209
#define CB_ADDR_TIME_VERSION 31402 // Version where times are included in addr messages.
#define CB_PONG_VERSION 60000 // Version where pings are responded with pongs.
#define CB_LIBRARY_VERSION 3 // Goes up in increments
#define CB_LIBRARY_VERSION_STRING "2.0 pre-alpha" // Features.Non-features pre-alpha/alpha/beta
#define CB_USER_AGENT_SEGMENT "/cbitcoin:2.0(pre-alpha)/"
#define CB_PRODUCTION_NETWORK_BYTE 0 // The normal network for trading
#define CB_TEST_NETWORK_BYTE 111 // The network for testing
#define CB_PRODUCTION_NETWORK_BYTES 0xD9B4BEF9 // The normal network for trading
#define CB_TEST_NETWORK_BYTES 0xDAB5BFFA // The network for testing
#define CB_TRANSACTION_INPUT_FINAL 0xFFFFFFFF // Transaction input is final
#define CB_TRANSACTION_INPUT_OUT_POINTER_MESSAGE_LENGTH 36
#define CB_BLOCK_MAX_SIZE 1000000 // ~0.95 MB Not including header.
#define CB_TRANSACTION_MAX_SIZE CB_BLOCK_MAX_SIZE - 81 // Minus the header
#define CB_VERSION_MAX_SIZE 492 // Includes 400 characters for the user-agent and the 9 byte var int.
#define CB_ADDRESS_BROADCAST_MAX_SIZE 1000
#define CB_INVENTORY_BROADCAST_MAX_SIZE 50000
#define CB_GET_DATA_MAX_SIZE 50000
#define CB_GET_BLOCKS_MAX_SIZE 16045
#define CB_GET_HEADERS_MAX_SIZE 64045
#define CB_BLOCK_HEADERS_MAX_SIZE 178009
#define CB_ALERT_MAX_SIZE 2100 // Max size for payload is 2000. Extra 100 for signature though the signature will likely be less.
#define CB_OUTPUT_VALUE_MINUS_ONE 0xFFFFFFFFFFFFFFFF // In twos complement it represents -1. Bitcoin uses twos compliment.
#define CB_ONE_BITCOIN 100000000 // Each bitcoin has 100 million satoshis (individual units).
#define CB_MAX_MONEY 21000000 * CB_ONE_BITCOIN // 21 million Bitcoins. 
#define CB_SOCKET_CONNECTION_CLOSE -1
#define CB_SOCKET_FAILURE -2
#define CB_SEND_QUEUE_MAX_SIZE 10 // Sent no more than 10 messages at once to a peer.
#define CB_BUCKET_NUM 255 // Maximum number of buckets<commit_msg>Made CB_MAX_MONEY work as long long integer<commit_after>//
//  CBConstants.h
//  cbitcoin
//
//  Created by <NAME> on 28/04/2012.
//  Copyright (c) 2012 <NAME>
//  
//  This file is part of cbitcoin.
//
//  cbitcoin is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//  
//  cbitcoin is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//  
//  You should have received a copy of the GNU General Public License
//  along with cbitcoin.  If not, see <http://www.gnu.org/licenses/>.

#ifndef CBCONSTANTSH
#define CBCONSTANTSH

//  Macros

#define CB_MESSAGE_MAX_SIZE 0x02000000 // 32 MB
#define CB_BLOCK_ALLOWED_TIME_DRIFT 7200 // 2 Hours from network time
#define CB_NETWORK_TIME_ALLOWED_TIME_DRIFT 4200 // 70 minutes from system time
#define CB_MIN_PROTO_VERSION 209
#define CB_ADDR_TIME_VERSION 31402 // Version where times are included in addr messages.
#define CB_PONG_VERSION 60000 // Version where pings are responded with pongs.
#define CB_LIBRARY_VERSION 3 // Goes up in increments
#define CB_LIBRARY_VERSION_STRING "2.0 pre-alpha" // Features.Non-features pre-alpha/alpha/beta
#define CB_USER_AGENT_SEGMENT "/cbitcoin:2.0(pre-alpha)/"
#define CB_PRODUCTION_NETWORK_BYTE 0 // The normal network for trading
#define CB_TEST_NETWORK_BYTE 111 // The network for testing
#define CB_PRODUCTION_NETWORK_BYTES 0xD9B4BEF9 // The normal network for trading
#define CB_TEST_NETWORK_BYTES 0xDAB5BFFA // The network for testing
#define CB_TRANSACTION_INPUT_FINAL 0xFFFFFFFF // Transaction input is final
#define CB_TRANSACTION_INPUT_OUT_POINTER_MESSAGE_LENGTH 36
#define CB_BLOCK_MAX_SIZE 1000000 // ~0.95 MB Not including header.
#define CB_TRANSACTION_MAX_SIZE CB_BLOCK_MAX_SIZE - 81 // Minus the header
#define CB_VERSION_MAX_SIZE 492 // Includes 400 characters for the user-agent and the 9 byte var int.
#define CB_ADDRESS_BROADCAST_MAX_SIZE 1000
#define CB_INVENTORY_BROADCAST_MAX_SIZE 50000
#define CB_GET_DATA_MAX_SIZE 50000
#define CB_GET_BLOCKS_MAX_SIZE 16045
#define CB_GET_HEADERS_MAX_SIZE 64045
#define CB_BLOCK_HEADERS_MAX_SIZE 178009
#define CB_ALERT_MAX_SIZE 2100 // Max size for payload is 2000. Extra 100 for signature though the signature will likely be less.
#define CB_OUTPUT_VALUE_MINUS_ONE 0xFFFFFFFFFFFFFFFF // In twos complement it represents -1. Bitcoin uses twos compliment.
#define CB_ONE_BITCOIN 100000000LL // Each bitcoin has 100 million satoshis (individual units).
#define CB_MAX_MONEY 21000000LL * CB_ONE_BITCOIN // 21 million Bitcoins.
#define CB_SOCKET_CONNECTION_CLOSE -1
#define CB_SOCKET_FAILURE -2
#define CB_SEND_QUEUE_MAX_SIZE 10 // Sent no more than 10 messages at once to a peer.
#define CB_BUCKET_NUM 255 // Maximum number of buckets
{'fraction_non_alphanumeric': 0.06476127540062779, 'fraction_numerical': 0.05253593259540724, 'mean_word_length': 4.493647912885662, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 6, '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': '4180684', 'n_tokens_mistral': 2177, 'n_tokens_neox': 1889, 'n_words': 697}