我一直在运行一个本地的Rinkeby节点(为了使用websocket事件),这个节点工作正常一段时间,但突然间我得到了"返回错误:替换事务价格过低".我发送的平均汽油价格是10倍,我仍然收到这个错误.这是我的计算:
gwei = 1000000000
gas = 47000
gasPrice = gwei * 20
Run Code Online (Sandbox Code Playgroud)
只有当我将汽油价格提高到(gwei*2000)时才能进行交易(0.9以太).这导致我很快耗尽以太,使开发变得非常困难.
示例tx:
{
"nonce": "0x23",
"chainId": 4,
"to": "0xB92427792629A23E0b2deE37b3F92Ce4D4cB794c",
"value": 0,
"gas": "0xb798",
"gasPrice": "0x4a817c800",
"data": "0xce07c1787465737400000000000000000000000000000000000000000000000000000000"
}
Run Code Online (Sandbox Code Playgroud)
任何帮助都很受欢迎!
Geth Rinkeby Cmd:
geth --rpccorsdomain="*" --rinkeby --ws --wsport=8546 --wsorigins="*" --datadir=$HOME/.rinkeby --cache=512 --rpc --rpcapi="personal,eth,network,net,web3,db" --rpcport=8545 --fast --bootnodes=enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30303
Run Code Online (Sandbox Code Playgroud) 我需要一个匹配字符串的正则表达式,只要它包含2位或更多位数.
是)我有的:
/(?=.*\d)(?=.*\d)/
和
/\d{2,}/
即使有一个数字,第一个将匹配,第二个要求有2个连续数字.我试图以不同的方式将它们组合起来无济于事.
有人能告诉我为什么这个代码中'i'的值打印出数字4?循环只到3,但它会在menu_feedback div中打印'i = 4'.
for(i=1; i<=3; i++){
$('#file_button'+i).hover(function (){
$('#menu_feedback').html('i = '+i+'<br/>');
}, function(){
$('#menu_feedback').html('');
});
}
Run Code Online (Sandbox Code Playgroud)
.
<button type="button" id="file_button1">Door 1</button>
<button type="button" id="file_button2">Door 2</button>
<button type="button" id="file_button3">Door 3</button>
<div id="menu_feedback"></div>
Run Code Online (Sandbox Code Playgroud) 仅当字符串中不包含子字符串“password”时,我才尝试进行正则表达式匹配。
我遇到的唯一声称可以解决此问题的解决方案是:
((?!password).)
然而这匹配'password123'
这可以用正则表达式吗?我有一种感觉,我可能不得不重新编写逻辑代码。
编辑:我正在使用Javascriptpattern.test(string)