Skip to content

Instantly share code, notes, and snippets.

@stoffu
stoffu / wallet2.cpp.patch
Created July 4, 2022 16:31
wallet2: remove most includes
--- wallet2.cpp 2022-06-17 22:26:39.000000000 +0900
+++ wallet2.new.cpp 2022-07-05 01:24:17.000000000 +0900
@@ -44,6 +44,7 @@
#include "cryptonote_config.h"
#include "wallet2.h"
+#if 0
#include "cryptonote_basic/cryptonote_format_utils.h"
#include "rpc/core_rpc_server_commands_defs.h"
#include "misc_language.h"
--- threadpool.cpp 2022-05-23 00:11:29.000000000 +0900
+++ threadpool.new.cpp 2022-06-30 22:19:49.000000000 +0900
@@ -41,6 +41,7 @@
namespace tools
{
threadpool::threadpool(unsigned int max_threads) : running(true), active(0) {
+#if 0
boost::thread::attributes attrs;
attrs.set_stack_size(THREAD_STACK_SIZE);
max = max_threads ? max_threads : tools::get_max_concurrency();
@stoffu
stoffu / wallet2.cpp.patch
Last active July 2, 2022 02:16
wallet2: empty all functions
--- wallet2.cpp 2022-06-17 22:26:39.000000000 +0900
+++ wallet2.new.cpp 2022-07-02 11:15:53.000000000 +0900
@@ -42,6 +42,7 @@
#include "include_base_utils.h"
using namespace epee;
+#if 0
#include "cryptonote_config.h"
#include "wallet2.h"
#include "cryptonote_basic/cryptonote_format_utils.h"
@stoffu
stoffu / base58.cpp.patch
Created June 15, 2022 15:17
base58: empty all functions except for static object instancing
--- base58.cpp 2022-06-09 09:57:03.000000000 +0900
+++ base58.new.cpp 2022-06-16 00:15:38.000000000 +0900
@@ -56,6 +56,7 @@
{
reverse_alphabet()
{
+#if 0
m_data.resize(alphabet[alphabet_size - 1] - alphabet[0] + 1, -1);
for (size_t i = 0; i < alphabet_size; ++i)
@stoffu
stoffu / unsigned_transaction.cpp.patch
Created June 14, 2022 15:55
unsigned_transaction.cpp: empty all functions
--- unsigned_transaction.cpp 2022-05-23 00:11:29.000000000 +0900
+++ unsigned_transaction.new.cpp 2022-06-15 00:53:59.000000000 +0900
@@ -70,6 +70,7 @@
bool UnsignedTransactionImpl::sign(const std::string &signedFileName)
{
+#if 0
if(m_wallet.watchOnly())
{
m_errorString = tr("This is a watch only wallet");
@stoffu
stoffu / address_book.cpp.patch
Last active July 16, 2022 13:59
address_book.cpp: empty all functions
--- address_book.cpp 2022-07-16 22:55:13.000000000 +0900
+++ address_book.new.cpp 2022-07-16 22:58:29.000000000 +0900
@@ -49,7 +49,7 @@
clearStatus();
cryptonote::address_parse_info info;
- if(!cryptonote::get_account_address_from_str(info, m_wallet->m_wallet->nettype(), dst_addr)) {
+ if(!cryptonote::get_account_address_from_str(info, MAINNET/*m_wallet->m_wallet->nettype()*/, dst_addr)) {
m_errorString = tr("Invalid destination address");
m_errorCode = Invalid_Address;
// Copyright (c) 2014-2019, AEON, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// Copyright (c) 2014-2019, AEON, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
--- CMakeLists.txt 2022-06-07 01:57:51.000000000 +0900
+++ CMakeLists.new.txt 2022-06-11 00:41:13.000000000 +0900
@@ -37,7 +37,8 @@
transaction_history.cpp
pending_transaction.cpp
utils.cpp
- address_book.cpp
+ address_book_first.cpp
+ address_book_last.cpp
subaddress.cpp
--- address_book.cpp 2022-05-23 00:11:29.000000000 +0900
+++ address_book.new.cpp 2022-06-09 23:52:00.000000000 +0900
@@ -31,7 +31,6 @@
#include "address_book.h"
#include "wallet.h"
-#include "crypto/hash.h"
#include "wallet/wallet2.h"
#include "common_defines.h"