<commit_before>#include <main.h>

//just an example


int main()
{
	ustring addre;
	addre.fromString(string("BM-2cUwUoj9YKoxsZMKT7C5N46tC1KTdUQZpH")); //just a test address
	PubAddr address;
	bool loaded = address.loadAddr(addre);

	BitMRC bitmrc;

	bitmrc.start();

	if(loaded)
		bitmrc.getPubKey(address);
	

	while (1)
	{
		printf("Select a command (help): ");
		char command[256];
		scanf("%s", command);
		if (!strcmp("quit", command))
			break;
		else if (!strcmp("sendb", command))
		{
			if (bitmrc.PrivAddresses.size() == 0)
			{
				printf("No private address\n");
				continue;
			}
			for (unsigned int i = 0; i < bitmrc.PrivAddresses.size(); i++)
			{
				printf("[%d] Private key: %s\n", i, bitmrc.PrivAddresses[i].getAddress().c_str());
			}
			printf("Select from address: ");
			unsigned int fro;
			scanf("%d", &fro);
			if (fro < 0 || fro >= bitmrc.PubAddresses.size())
			{
				printf("Incorrect selection\n");
				continue;
			}

			ustring msg;
			printf("Message to send:\n");
			scanf("%s", command);
			msg.fromString(command);
			bitmrc.sendBroadcast(msg, bitmrc.PrivAddresses[fro]); //maybe this should be done in another thread
			printf("Broadcast sent\n");
		}
		else if (!strcmp("send", command))
		{
			if (bitmrc.PrivAddresses.size() == 0)
			{
				printf("No private address\n");
				continue;
			}

			if (bitmrc.PubAddresses.size() == 0)
			{
				printf("No public address\n");
				continue;
			}
			for (unsigned int i = 0; i < bitmrc.PubAddresses.size(); i++)
			{
				printf("[%d] Public key: %s Ready: %s\n", i, bitmrc.PubAddresses[i].getAddress().c_str(), bitmrc.PubAddresses[i].waitingPubKey() ? "False" : "True");
			}
			printf("Select destination address: ");
			unsigned int des;
			scanf("%d", &des);
			if (des < 0 || des >= bitmrc.PubAddresses.size())
			{
				printf("Incorrect selection\n");
				continue;
			}<commit_msg>fix: send message command input<commit_after>#include <main.h>

//just an example


int main()
{
	ustring addre;
	addre.fromString(string("<KEY>")); //just a test address
	PubAddr address;
	bool loaded = address.loadAddr(addre);

	BitMRC bitmrc;

	bitmrc.start();

	if(loaded)
		bitmrc.getPubKey(address);
	

	while (1)
	{
		printf("Select a command (help): ");
		char command[256];
		scanf("%s", command);
		if (!strcmp("quit", command))
			break;
		else if (!strcmp("sendb", command))
		{
			if (bitmrc.PrivAddresses.size() == 0)
			{
				printf("No private address\n");
				continue;
			}
			for (unsigned int i = 0; i < bitmrc.PrivAddresses.size(); i++)
			{
				printf("[%d] Private key: %s\n", i, bitmrc.PrivAddresses[i].getAddress().c_str());
			}
			printf("Select from address: ");
			unsigned int fro;
			scanf("%d", &fro);
			if (fro < 0 || fro >= bitmrc.PubAddresses.size())
			{
				printf("Incorrect selection\n");
				continue;
			}

			ustring msg;
			msg.clear();
			printf("Message to send [terminate with a single '.']:\n");
			command[0]='\0';
			do {
				scanf("%s", command);
				msg.append(command);
			} while( (strlen(command) >= 2) || (strcmp(".", command)!=0) );

			bitmrc.sendBroadcast(msg, bitmrc.PrivAddresses[fro]); //maybe this should be done in another thread
			printf("Broadcast sent\n");
		}
		else if (!strcmp("send", command))
		{
			if (bitmrc.PrivAddresses.size() == 0)
			{
				printf("No private address\n");
				continue;
			}

			if (bitmrc.PubAddresses.size() == 0)
			{
				printf("No public address\n");
				continue;
			}
			for (unsigned int i = 0; i < bitmrc.PubAddresses.size(); i++)
			{
				printf("[%d] Public key: %s Ready: %s\n", i, bitmrc.PubAddresses[i].getAddress().c_str(), bitmrc.PubAddresses[i].waitingPubKey() ? "False" : "True");
			}
			printf("Select destination address: ");
			unsigned int des;
			scanf("%d", &des);
			if (des < 0 || des >= bitmrc.PubAddresses.size())
			{
				printf("Incorrect selection\n");
				continue;
			}
{'fraction_non_alphanumeric': 0.18259297520661158, 'fraction_numerical': 0.008522727272727272, 'mean_word_length': 3.346801346801347, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1148117', 'n_tokens_mistral': 1695, 'n_tokens_neox': 1418, 'n_words': 321}