TurtleCoin fork: how to define addresses prefix for miner? - bitcoin

I forked TurtleCoin and customized some config including addresses pefix. I compiled it on Windows using Visual Studio. Wallet and daemon work fine but miner do not work. When I start miner and add address get this message:
Address is not valid: The address does not have the correct prefix corresponding to this coin - it appears to be an address for another cryptocurrency.
Where can I define addresses pefix for miner?
I followed these steps: https://github.com/turtlecoin/turtlecoin#windows

Interesting, looking over the codebase this error is referred to as ADDRESS_WRONG_PREFIX. Which is returned by an the function validateAddresses which the mining code calls, here.
This function simply checks that the prefix matches WalletConfig::addressPrefix, meaning that as long as you changed the address prefix in the wallet config located here. It should work.. I hope this is helpful.

Related

Parse a group of cisco switches, compile a list of IPs and interfaces, and then point a netmiko script to that new list. Possible?

I think my choice of words is correct. I want to take a group of switches and compile a list of Ip addresses and specific interfaces to have netmiko push commands to. For instance, scan all cisco switches and put together a list of all interfaces in vlan X and not being used. Can someone point me in the right direction of how to do this?
Sounds like you need to figure out the different steps to work out your solution.
Maybe something this:
Connect to switch
run show commands
config interface to vlan xx
I don't see any code or anything you have attempted so far but here is a simple flow for looping through a list of IP addresses.
#Python 3.7
from netmiko import ConnectionHandler
username = "user"
password = "password"
for ip in IPlist:
# netmiko code profiles;
cisco ={
"host":IP,
"username":username,
"password":password,
"device_type: "cisco_ios"
}
with ConnectHandler(**cisco) as ssh_conn:
print(sshcon.find_prompt())
# do stuff here.

Domino Mailbox tool hung with NAMELookup2

We have developed the tools to read the emails from the Domino mailboxes and write those into the separate file in local disk(Its look like a backup). Recently we have created a new domino 9 test environment with our lab. But, our tools not working properly with our new domino work environment. To identify the problem about this issue, I have added some debug logs and it seems to look like the control hanged with the function "NAMELookup2". Here, I have added the code snippet,
DHANDLE hLookup;
char *pLookup;
if (NAMELookup2("Local", 0, 1, "$users", 1, dominoUser, 2, "FullName", &hLookup) == NOERROR) // hunged with this line
{
pLookup = (char *) OSLockObject(hLookup);
}
The same tool working fine with our other test environment. So, I think there is no problem with the code. I suspect that maybe the problem with our new work environment setup creation, or maybe missed to provide some kind permission to the users, or maybe I missed to add the mailboxes somewhere, etc.
Note:
I have run the tool with admin privilege user.
It would be great if anyone gives some direction on this.
Thanks,
See this NAMELookup2 page for reference. The function is declared as:
STATUS LNPUBLIC NAMELookup2(const char far *ServerName, DWORD Flags,
WORD NumNameSpaces, const char far *NameSpaces,
WORD NumNames, const char far *Names,
WORD NumItems, const char far *Items,
DHANDLE far *rethBuffer);
where NumItems is the number of null-terminated item names starting at the Items address. The code snippet in your question is passing a single item name ("FullName"), but is setting NumItems to 2. That is clearly wrong and could explain the hang. NumItems should be 1.
I am also suspicious of the ServerName argument. The documentation recommends passing NULL when you want to do a local lookup. Passing "Local" may be another way to accomplish the same, but you need to change your code in any case. I recommend changing the first argument to NULL.

unable to connect to default instance using it's full name

I am developing an app that needs to get from a user a server name or address and a db name and build a folder structure based on that. The problem is that in order to have the same folder for all the different ways there are to get the path to the instance (localhost, ip address, etc.) i'm running the following Query:
select cast(SERVERPROPERTY('MachineName')as varchar)+'\'+##servicename
on the target server and set my folder structure based on that, and in that format saves the connection that the user gave (doesn't matter if i got ip or a server name, there is one connection string for all).
My problem is that when the instance is the default instance on the target machine, I cant seem to connect using MACHINE_NAME\MSSQLSERVER. I can only log in using the machine without instance name. So I need to either find a way to connect to the instance using its full name (preferred) or to find a way figure out if the targeted instance is the default one.
Any help would be very appreciated.
'MSSQLSERVER' is reserved for default instance, so you can
SELECT CAST(SERVERPROPERTY('MachineName')AS VARCHAR)+ CASE WHEN CHARINDEX('MSSQLSERVER', ##SERVICENAME, 1) >0 THEN '' ELSE '\'+##SERVICENAME END

Asterisk dial command return dialed number

I'm looking for a variable that can tell me which number 'won' the call on a multi-target Dial command.
Example:
Dial(SIP/1000&SIP/1001&SIP/1002,30)
Set(the_unlucky_winner=${...})
I'm not getting anything from the ${DIALEDPEERx} variables. Sounds like these vars are broken but I don't know if this is what I should be using.
Ancient version 1.2.14 deployed at this site. All clients are SIP
Thanks anyone
Only realistic way do that - cal via Local channle like freepbx do(check freepbx.org source) or use Macro on answer(i am afraid not work in 1.2)
Parse the contents of the CDR record for the file. One of the fields is dstchannel which will hold a value like SIP/1002-9786b0b0.
Also keep in mind that the call variable stack is wiped on hangup, unless you have an "h" (hangup) extension defined for the context. So, you can most easily handle your post-call processing there.
Further Reading:
http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/asterisk-SysAdmin-SECT-1.html
Please Note:
if this answer turns out to solve your problem, please "accept" it for the benefit of others trying to solve the same problem later
Hi all I have a solution to this problem. It is working fine for both normal dial and multi target dial.
In dialstring add a macro, here I am adding "followme" macro.
M(followme)
$agi->exec("dial", "SIP/6001#sip.example.com&SIP/6002#sip.example.com,rtTgM(followme)");
Then after call is answered it ll go to context
[macro-followme]
In this context you write one script to get the connected calls information by
$dstchannel=$agi->get_variable("DIALEDPEERNUMBER");
The way I managed to do it is as follows
Dial(SIP/1000&SIP/1001&SIP/1002,30,M(whoanswered))
[macro-whoanswered]
exten => s,1,NoOp(${CHANNEL})
You will see that the actual extension that answered is containes in ${CHANNEL}
If 1001 answered the channel will be something like SIP/1001-00017cf1
Just use the CUT command to cut it by / and -

GDB Api lookup_symbol does not get symbol address

This is a question about changing GDB code to add my own CLI to it.
I'm using lookup_symbol("XYZ", ...) to find a global system address in my coredump. The API succeeds - i.e, gets the symbol data struct with symbol name, but no address.
'print XYZ' works fine!
What can I change to get the symbol address correctly.