Warum löst web3.db.putString einen Fehler aus?

Immer wenn ich web3.db.putString("user","name","jon_lobo")den Befehl von der Geth-Konsole aus versuche, wird der Fehler unten angezeigt

Fehler: Die Methode db_putString existiert nicht/ist nicht verfügbar unter web3.js:3119:20 bei web3.js:6023:15 bei web3.js:4995:36 bei :1:1

Antworten (1)

Es scheint, dass die web3.db in Geth 1.4 entfernt wurde, ich persönlich hatte das gleiche Problem schon einmal

> web3.db
{
  getHex: function(),
  getString: function(),
  putHex: function(),
  putString: function()
}
> web3.db.putString('testDB', 'key', 'myString')
Error: The method db_putString does not exist/is not available
    at web3.js:3104:20
    at web3.js:6191:15
    at web3.js:5004:36
    at <anonymous>:1:1

> web3.db.putHex('testDB', 'key', web3.fromAscii('myString'))
Error: The method db_putHex does not exist/is not available
    at web3.js:3104:20
    at web3.js:6191:15
    at web3.js:5004:36
    at <anonymous>:1:1

> web3.db.getString('testDB', 'key')
Error: The method db_getString does not exist/is not available
    at web3.js:3104:20
    at web3.js:6191:15
    at web3.js:5004:36
    at <anonymous>:1:1

> web3.db.getHex('testDB', 'key')
Error: The method db_getHex does not exist/is not available
    at web3.js:3104:20
    at web3.js:6191:15
    at web3.js:5004:36
    at <anonymous>:1:1

> web3.version
{
  api: "0.18.1",
  ethereum: "0x3f",
  network: "65535",
  node: "Geth/v1.6.1-stable-021c3c28/linux-amd64/go1.8.1",
  whisper: undefined,
  getEthereum: function(callback),
  getNetwork: function(callback),
  getNode: function(callback),
  getWhisper: function(callback)
}

und ich habe diese Antwort gefunden: Entfernen Sie web3.db ,


hoffe es konnte helfen